[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] sip: C++ virtual methods
From:       Patrick Stinson <ajole-1 () gci ! net>
Date:       2003-09-24 23:55:02
[Download RAW message or body]

Using RTTI sounds like a better idea. Cleaner, more cpp like. Thanks, Phil.

On Wednesday 24 September 2003 10:10, Phil Thompson wrote:
> On Wednesday 24 September 2003 6:04 pm, Patrick Stinson wrote:
> > in progression:
> >
> > Does the %ConvertToSubClassCode directive require some sort of class
> > identification mechanism to be written into the original cpp library
> > code? QEvent returns an enumerated value in type(), as well ass
> > QApplication and some others, and QObject has QObject::className() that
> > returns a string identifier. that can be used in conjuction with
> > sipMapStringToClass() and a sipStringTypeClassMap struct.
>
> Yes, although sipMapStringToClass() is just a helper for when the RTTI is a
> string. sipMapIntToClass() exists as well, or you can do something entirely
> different with your own code.
>
> > Does this mean I have to modify my cpp library to add some sort of class
> > identifier for classs/subclasses if I want polymorphic return values in
> > my python functions?
>
> Or use the standard C++ RTTI stuff.
>
> Phil
>
> _______________________________________________
> PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic