- Timestamp:
- Dec 24, 2005, 7:14:06 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r6276 r6278 18 18 /*! 19 19 * @file class_id.h 20 * @brief list of orxonox classID's20 * @brief list of orxonox ClassID's 21 21 * 22 22 * this File is used to identify an Object with its class and also with its sub/super-classes. 23 * this is also used by the ObjectManager to identify and load important classes23 * this is also used by the ObjectManager/Factory to identify and load important classes 24 24 * 25 25 * !! important !! 26 26 * When adding a new CLASS be sure about the following: 27 27 * 1. if it is a (SUB)SUPERCLASS make sure there is still space left (if not think of a new approach) 28 * 2. if it is a (SUB)SUPERCLASS also add the CLASS to BaseObject::whatIs() so we have nice output :) 29 * 3. check if the Number you add is not refered to twice, and that with (SUB)SUPERCLASSES there are no intersections 30 * 4. be sure to add you stuff in the right section, and don't interest yourself for the order of things. :) 28 * 2. check if the Number you add is not refered twice, and that with (SUB)SUPERCLASSES there are no intersections 29 * 3. be sure to add you stuff in the right section, and don't interest yourself for the order of things. :) 31 30 */ 32 31 … … 37 36 /** 38 37 * inheritance is done in the following way: Classes are identified by 39 * a HEX-number eg: 0x 1234567838 * a HEX-number eg: 0xa0b18a05 40 39 * The number has 8^4 entries. 41 * The first two: 1,2 superclass identifiers to 42 * The second three are for subclasses with inheritance: 43 * the first of these numbers is defining the subclassType, it may be anything between 1-a 44 * The following two may not be the same in any way, 45 * eg. the bits may not intersect (no 1, 2 and a 3; 01, 02 and 04, 08, 10 would be ok) 46 * The last three entries are for any classes in existence eg. SkyBox and so on 47 * 40 * 41 * ------------------------------------------------------------------------------------------- 42 * Consider the Identifiers 0xABCDEFGH 43 * The first two: A and B are superclass Identifiers !! THEY ARE ALREADY FULL !! 44 * 45 * The second three are for sub-superclass-groups inheritance: 46 * C: a Group identifier: can be anything from 1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h 47 * D,E: Member within the Group, to specify further deriavtions within the Group. 48 * These may be anything from 1,2,4,8 (at D and E) 49 * !! consider, that you may not have a derivated class from group a and group b. 50 * 51 * The last three entries F,G,H are for any leaf classes in existence. 52 * they are ordered in the following way: 53 * F: LEAF-GroupSpecifier 54 * G,H: UNIQUE NUMBER eithin F-Group. 55 * ------------------------------------------------------------------------------------------- 56 * 57 * COUNT: 48 58 * -> # max SuperClass-count = 7 (not intersecting) 49 59 * # max SubSuperClass-count = 15*7 = 105 (the 7 classes will be able to get derived from each other, but not over the SubSuperClass.) … … 198 208 CL_BOUNDING_VOLUME = 0x00a10000, 199 209 CL_OBB = 0x00020617, 200 CL_BOUNDING_SPHERE = 0x00 a40618,210 CL_BOUNDING_SPHERE = 0x00040618, 201 211 202 212 // graphical stuff (range from 0x00000800 to 0x000009ff) … … 216 226 CL_SHADER = 0x00000822, 217 227 // GL-GUI 218 CL_GLGUI_WIDGET = 0x0050 1901,219 CL_GLGUI_BUTTON = 0x00 502902,228 CL_GLGUI_WIDGET = 0x00500000, 229 CL_GLGUI_BUTTON = 0x00001000, 220 230 CL_GLGUI_PUSHBUTTON = 0x00000903, 221 231 CL_GLGUI_CHECKBUTTON = 0x00000904, 222 232 CL_GLGUI_RADIOBUTTON = 0x00000905, 223 CL_GLGUI_CONTAINER = 0x00 504906,233 CL_GLGUI_CONTAINER = 0x00002906, 224 234 CL_GLGUI_BOX = 0x00000907, 225 235 CL_GLGUI_FRAME = 0x00000908, … … 248 258 CL_ANIMATION = 0x00000d01, 249 259 // CL_ANIMATION3D = 0x00000b02, 250 CL_QUICK_ANIMATION = 0x00000 b02,251 CL_FACTORY = 0x00000 b03,252 CL_INI_PARSER = 0x00000 b04,253 CL_LIST = 0x00000 b05,254 CL_SUBSTRING = 0x00000 b06,255 CL_LOAD_PARAM = 0x00000 b07,256 CL_CURVE = 0x00000 b08,257 CL_VECTOR = 0x00000 b09,258 CL_CHARACTER_ATTRIBUTES = 0x00000 b0a,259 CL_TRACK_ELEMENT = 0x00000 b0b,260 CL_NUMBER = 0x00000 b0c,261 CL_EXECUTOR = 0x00000 b0d,262 CL_FAST_FACTORY = 0x00000 c01,263 CL_SHELL = 0x00000 c10,264 CL_SHELL_COMMAND = 0x00000 c11,265 CL_SHELL_COMMAND_CLASS = 0x00000 c12,266 CL_SHELL_INPUT = 0x00000 c13,267 CL_SHELL_COMPLETION = 0x00000 c14,268 CL_SHELL_COMMAND_ALIAS = 0x00000 c15,260 CL_QUICK_ANIMATION = 0x00000d02, 261 CL_FACTORY = 0x00000d03, 262 CL_INI_PARSER = 0x00000d04, 263 CL_LIST = 0x00000d05, 264 CL_SUBSTRING = 0x00000d06, 265 CL_LOAD_PARAM = 0x00000d07, 266 CL_CURVE = 0x00000d08, 267 CL_VECTOR = 0x00000d09, 268 CL_CHARACTER_ATTRIBUTES = 0x00000d0a, 269 CL_TRACK_ELEMENT = 0x00000d0b, 270 CL_NUMBER = 0x00000d0c, 271 CL_EXECUTOR = 0x00000d0d, 272 CL_FAST_FACTORY = 0x00000d01, 273 CL_SHELL = 0x00000d10, 274 CL_SHELL_COMMAND = 0x00000d11, 275 CL_SHELL_COMMAND_CLASS = 0x00000d12, 276 CL_SHELL_INPUT = 0x00000d13, 277 CL_SHELL_COMPLETION = 0x00000d14, 278 CL_SHELL_COMMAND_ALIAS = 0x00000d15, 269 279 270 280 // Spatial Data Separation -
trunk/src/lib/lang/base_object.cc
r6276 r6278 79 79 this->className = className; 80 80 81 ClassList::addToClassList(this, classID, className);82 } 83 84 /** 85 \brief set the name of the Object81 ClassList::addToClassList(this, classID, this->classID, className); 82 } 83 84 /** 85 * @briefbrief set the name of the Object 86 86 */ 87 87 void BaseObject::setName (const char* objectName) -
trunk/src/lib/lang/class_list.cc
r6077 r6278 37 37 * Creates a new ClassList 38 38 */ 39 ClassList::ClassList(ClassID classID, const char* className)39 ClassList::ClassList(ClassID classID, unsigned long classIDFull, const char* className) 40 40 { 41 41 this->className = className; 42 42 this->classID = classID; 43 this->classIDFull = classIDFull; 43 44 } 44 45 … … 66 67 * !! Before unsing the ClassList, as it creates the ClassLits 67 68 */ 68 void ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, const char* className)69 void ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const char* className) 69 70 { 70 71 if (unlikely(classList == NULL)) … … 78 79 else 79 80 { 80 ClassList::classList->push_back(ClassList(classID, class Name));81 ClassList::classList->push_back(ClassList(classID, classIDFull, className)); 81 82 ClassList::classList->back().objectList.push_back(objectPointer); 82 83 } -
trunk/src/lib/lang/class_list.h
r6077 r6278 31 31 */ 32 32 class ClassList { 33 34 33 public: 35 ClassList(ClassID classID, const char* className);34 ClassList(ClassID classID, unsigned long classIDFull, const char* className); 36 35 virtual ~ClassList(); 37 36 38 / / STATIC FUNCTIONS39 static void addToClassList(BaseObject* objectPointer, ClassID classID, const char* className);37 /* MAINTENANCE FUNCTIONS THESE ARE !!ONLY FOR BASEOBJECT !! */ 38 static void addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const char* className); 40 39 static void removeFromClassList(BaseObject* objectPointer); 40 41 41 42 42 43 static const std::list<BaseObject*>* getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; }; … … 59 60 60 61 private: 61 62 62 static ClassList* getClassList(ClassID classID); 63 63 static ClassList* getClassList(const char* className); 64 64 65 65 private: 66 ClassID classID; //!< ClassID stored in this ClassList 67 unsigned long classIDFull; //!< The Full ClassID of this Class. 66 68 67 ClassID classID; //!< ClassID stored in this ClassList68 69 const char* className; //!< Name of the Class Stored here 69 70 -
trunk/src/world_entities/test_entity.cc
r6222 r6278 47 47 if (root != NULL) 48 48 this->loadParams(root); 49 50 this->init();51 49 } 52 50 -
trunk/src/world_entities/test_entity.h
r6222 r6278 12 12 class TiXmlElement; 13 13 14 class TestEntity : public WorldEntity, PhysicsInterface14 class TestEntity : public WorldEntity, public PhysicsInterface 15 15 { 16 16 friend class World;
Note: See TracChangeset
for help on using the changeset viewer.