[C++-sig] exclude an entire class with pyste ?

Dominique Devriese dominique.devriese at student.kuleuven.ac.be
Tue Apr 22 14:31:02 CEST 2003

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..

  nicodemus> Certainly, but not with this header, since it doesn't
  nicodemus> contain any useful info about SomeInternalClass. The user
  nicodemus> will have to export the class from SomeInternalClass.h,
  nicodemus> using Class or AllFromHeader constructs, as any other
  nicodemus> class.

  nicodemus> But If you don't want to use the methods and attributes
  nicodemus> of SomeInternalClass, you just want to use functions that
  nicodemus> pass the class around, you should use
  nicodemus> return_opaque_pointer as a call policy. So your example
  nicodemus> would be exported as:

having read up on return_opaque_pointer, I must agree that you're
right, sorry :)


You will outgrow your usefulness.

More information about the Cplusplus-sig mailing list