[C++-sig] exclude an entire class with pyste ?
David Abrahams
dave at boost-consulting.com
Tue Apr 22 02:36:38 CEST 2003
Dominique Devriese <dominique.devriese at student.kuleuven.ac.be> writes:
> nicodemus writes:
>
> nicodemus> Indeed, that is a "misfeature" of pyste, because it
> nicodemus> shouldn't export forward declared classes at all. I
> nicodemus> believe the desired behaviour would be to show a warning
> nicodemus> in case the user tries to export an forward declared
> nicodemus> class explicitly (using "Class"), or silently ignore them
> nicodemus> when the AllFromHeader construct is used.
>
> I'm not sure if silently ignoring is a good option, since I can
> imagine that if someone has code like
> class SomeInternalClass;
>
> SomeInternalClass& getClass();
>
> doSomething( SomeInternalClass& );
>
> he'll want it to be exported..
But you can't export a class unless you can see its definition
(ignoring the use of opaque pointer converters, of course). In fact,
if such a forward declaration is visible it's quite likely the class
is being exported in a different extension module.
You know, the Boost.Python documentation hardly mentions that
extension modules can interoperate with one another's exported
classes. We probably ought to say something about that...
> nicodemus> The fact that you can't exclude a class is a bug too.
>
> i think this would be a better solution..
I think Nicodemus has the right idea in this case.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list