[gameprogrammer] Re: detecting class type at runtime

  • From: luo_hei@xxxxxxxx
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Fri, 20 Apr 2012 08:48:47 -0400

On 19/04/12 19:43, Chris Eineke wrote:
On 12-04-18 09:09 AM, luo_hei@xxxxxxxx wrote:
I have the following:

Well, the problem was the following: Im creating an scene editor for a game engine. The initial work I received used a NodeFactory class that registers different widgets for each node type by creating an array of widgets indexed by node type ("MeshSceneNode", "SkyboxNode", etc). It was good for creating new nodes, but when you need to edit a node, there is no way what kind of node you are dealing with. We solved the problem adding a getClassName() to our ancestor class, and I have found yesterday that it will be useful for widget theming too, to get the widget type of the class instance.

--
Roger D. Vargas
Using Gentoo Linux 2010
La unica forma de encontrar los limites de lo posible es yendo mas
alla de ellos, hacia lo imposible

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: