Game Development Community

Explanation of how ConsoleObject works?

by Mike Stoddart · in Torque Game Engine · 01/28/2003 (6:12 pm) · 0 replies

I've always been intrigued by how the code in ConsoleObject works:

#define DECLARE_CONOBJECT(className)                      \
   static ConcreteClassRep<className> dynClassRep;      \
   static AbstractClassRep* getParentStaticClassRep(); \
   static AbstractClassRep* getStaticClassRep(); \
   virtual AbstractClassRep* getClassRep() const

I *sort* of understand what it's doing (object factory?), but not nearly as well I want to. Are there any good references on the web that can explain what this code does and how it works in layman's terms? I know that this is Torque code, but I presume the concept used is quite common.

Thanks