RE: [GD-General] Overhead of RTTI
Brought to you by:
vexxed72
From: <ce...@ce...> - 2002-12-27 08:14:02
|
Oh yes sorry, too much vacation for my brain lately :) To explain, I need this when for example I have a MI class and at a point I cast it into one of the base classes and at a latter point I want to cast it into the initial derived class. The current workaround is to set the base class in which I cast as the first one from which my dervied class inherits, but is not exactly the right way I believe. -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Mickael Putters Sent: Friday, December 27, 2002 1:13 AM To: gam...@li... Subject: Re: [GD-General] Overhead of RTTI Hmm I hope you meant reinterpret_cast, otherwise I'd understand why you need RTTI in order to make things work. ----- Original Message ----- From: "Adrian Cearn=E3u" <ce...@ce...> To: <gam...@li...> Sent: Thursday, December 26, 2002 6:34 PM Subject: RE: [GD-General] Overhead of RTTI > Okay, but does any of you know what other overhead will RTTI introduce > if dynamic_cast will be used strictly when static_cast won't work (like > when having to do with MI)? Maybe a structure size overhead, but how > big? > > Thanks, > Adrian > > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On Behalf Of > Nicolas Romantzoff > Sent: Tuesday, December 24, 2002 6:47 PM > To: gam...@li... > Subject: RE: [GD-General] Overhead of RTTI > > > > > > Objects should inherit at most ONE object, and implement as many > > > interfaces as needed. Interfaces should expend at most ONE > > interface. > > > > Can you explain more carefully? I didn't really understand > > the second rule. > > > > That second rule is just to say that you never need MI at interface > level. > Just define separate interfaces. > I'm even wondering if one would need inheritance for interfaces at all > (apart from a "root" interface like the COM's IUnknown). > > Objects on the opposite do need MI for interface implementation. > > Here, we are trying to use different words for inheritance: > Object To Object inheritance =3D Override (the "IS A" relationship). > Object To Interface inheritance =3D Implementation. > Interface To Interface inheritance =3D Expansion. > (of course there is never any Interface To Object inheritance). > > > > Nicolas > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU7 |