[C++-sig] wrapping virtual function returning void

Faheem Mitha faheem at email.unc.edu
Sun Aug 7 19:00:43 CEST 2005

On Sun, 7 Aug 2005, Eric Jardim wrote:

> The wrapper<...> is doing goog things. Before the existence of wrapper<...>,
> when someone wanted to create derived wrapper class, they should expose a
> "PyObject* self" (which is a low-level pointer for the
> Boost.Pythonhigh-level users) as the first argument of every
> constructor.
> Now, with wrapper<...>, it is incapsulating the "PyObject* self" and you
> don't even have to know it exists. Besides, it creates this get_override
> function, that helps you if an virtual method was overriden in Python.

Yes, but what does it mean to say that a virtual method is overriden in 
Python, exactly?

>> According to the documentation, it overrides the base class in Python. 
>> assume this is related to the derived class wrappers in Python knowing 
>> of their derived relationship to the base class wrapper, but I'm pretty 
>> fuzzy on the details.

> That's the good point of the incapsulation. While it works, you don't have
> to care about the details :)

Details are good. :-)                                             Faheem.

More information about the Cplusplus-sig mailing list