[C++-sig] boost.python metaclass problem

Stefan Seefeld seefeld at sympatico.ca
Fri Mar 2 17:02:56 CET 2007


Ralf W. Grosse-Kunstleve wrote:
>> I don't know pyqt, and I'm not sure you get access to boost.python's
>> own metaclass. (David ?)
> 
> Simply use the __class__ attribute of a Boost.Python wrapped class.
> I.e. if the class is "bar" (and you construct objects with "bar()"),
> bar.__class__
> will give you the metaclass.
> See also: boost/libs/python/doc/tutorial/doc/tutorial.qbk
> Look for:  __metaclass__

Yeah, I certainly know how to access an object's metaclass. What I
don't know is how to access that metaclass directly to derive from
it in order to generate a new metaclass suitable for the new class...

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list