OgreAny with inherited class

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

OgreAny with inherited class

Post by boyamer »

Hi Developers,
Lets say i'm using Ogre Any on Texture, when i call Any::get() i'm getting exception because Textures is not same type of RenderSystem implementation texture.
I think the check would be with something from std::type_traits or maybe is_base_of (http://www.cplusplus.com/reference/type ... s_base_of/).

Amer
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56

Re: OgreAny with inherited class

Post by Klaim »

If I understand correctly, the check would have to be on runtime so it would be a comparison of typeid() values.