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.
Post Reply
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy

OgreAny with inherited class

Post by boyamer » Tue Dec 11, 2012 12:50 pm

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
0 x

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

Re: OgreAny with inherited class

Post by Klaim » Tue Dec 11, 2012 3:13 pm

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

Post Reply