Changeset 4742 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 30, 2005, 4:38:33 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/class_id.h
r4740 r4742 17 17 18 18 /*! 19 \file class_ list.h20 \brief list of orxonox class es19 \file class_id.h 20 \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. … … 31 31 */ 32 32 33 #ifndef _CLASS_LIST_H 34 #define _CLASS_LIST_H 35 36 37 #define ClassDefinition(CLASS_DEFINITION, CLASS_VALUE, CLASS_NAME) \ 38 CLASS_DEFINITION 33 #ifndef _CLASS_ID_H 34 #define _CLASS_ID_H 39 35 40 36 //! list of all classes to be loadable in via the ObjectManager … … 130 126 // Physics stuff (range from 0x00000600 to 0x000007ff) 131 127 CL_PHYSICS_CONNECTION = 0x00000601, 128 CL_FIELD_GRAVITY = 0x00000610, 129 CL_FIELD_POINT_GRAVITY = 0x00000611, 130 CL_FIELD_TWIRL = 0x00000612, 131 132 132 133 // Collision 133 134 CL_COLLISION = 0x00000611, … … 177 178 178 179 179 #endif /* _CLASS_ LIST_H */180 #endif /* _CLASS_ID_H */ -
orxonox/trunk/src/lib/collision_detection/cd_engine.cc
r4710 r4742 31 31 CDEngine::CDEngine () 32 32 { 33 this->setClassName("CDEngine");34 33 this->setClassID(CL_CD_ENGINE, "CDEngine"); 35 34 -
orxonox/trunk/src/lib/coord/p_node.cc
r4610 r4742 101 101 void PNode::init(PNode* parent) 102 102 { 103 this->setClassID(CL_PARENT_NODE );103 this->setClassID(CL_PARENT_NODE, "PNode"); 104 104 this->children = new tList<PNode>(); 105 105 this->bRelCoorChanged = true; -
orxonox/trunk/src/lib/lang/base_object.cc
r4596 r4742 68 68 void BaseObject::setClassID(long classID, const char* className) 69 69 { 70 this->setClassID(classID);71 this->setClassName(className);72 }73 74 75 /**76 \brief sets the class identifier77 \param id a number for the class from class_list.h enumeration78 */79 void BaseObject::setClassID (long classID)80 {81 70 this->classID |= classID; 82 }83 84 85 /**86 \brief sets the class identifiers87 \param className the class name88 */89 void BaseObject::setClassName(const char* className)90 {91 71 this->className = className; 92 72 } … … 95 75 \brief set the name of the Object 96 76 */ 97 77 void BaseObject::setName (const char* objectName) 98 78 { 99 79 if (this->objectName) -
orxonox/trunk/src/lib/lang/base_object.h
r4595 r4742 4 4 5 5 This is a global handler for all classes. 6 7 \todo isA()8 6 */ 9 7 … … 12 10 #define _BASE_OBJECT_H 13 11 14 #include "class_ list.h"12 #include "class_id.h" 15 13 #ifndef NULL 16 14 #define NULL 0x0 //!< NULL … … 45 43 46 44 protected: 47 void setClassID(long classID);48 void setClassName(const char* className);49 45 void setClassID(long classID, const char* className); 50 46 … … 52 48 void finalize(void) { this->finalized = true; }; 53 49 54 private: 55 const char* className; //!< the name of the class 56 long classID; //!< this is the id from the class_list.h enumeration 57 char* objectName; //!< The name of this object 50 private: 51 static void addToClassList(BaseObject* object, ClassID id, const char* className); 58 52 59 bool finalized; //!< is true if the object is ready to be garbage collected 53 private: 54 const char* className; //!< the name of the class 55 long classID; //!< this is the id from the class_list.h enumeration 56 char* objectName; //!< The name of this object 57 58 bool finalized; //!< is true if the object is ready to be garbage collected 59 60 // static ClassList* classList; 60 61 }; 61 62 -
orxonox/trunk/src/lib/physics/fields/gravity.cc
r4730 r4742 25 25 CREATE_FACTORY(Gravity); 26 26 27 /**28 \brief standard constructor29 \todo this constructor is not jet implemented - do it30 */31 Gravity::Gravity ()32 {33 this->setClassName("Gravity");34 }35 36 27 Gravity::Gravity(const TiXmlElement* root) 37 28 { 38 this->setClass Name("Gravity");29 this->setClassID(CL_FIELD_GRAVITY, "Gravity"); 39 30 40 this->loadParams(root); 31 if (root != NULL) 32 this->loadParams(root); 41 33 } 42 34 -
orxonox/trunk/src/lib/physics/fields/gravity.h
r4728 r4742 18 18 19 19 public: 20 Gravity(); 21 Gravity(const TiXmlElement* root); 20 Gravity(const TiXmlElement* root = NULL); 22 21 virtual ~Gravity(); 23 22 -
orxonox/trunk/src/lib/physics/fields/point_gravity.cc
r4395 r4742 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 25 25 \todo this constructor is not jet implemented - do it 26 26 */ 27 PointGravity::PointGravity () 27 PointGravity::PointGravity () 28 28 { 29 this->setClass Name ("PointGravity");29 this->setClassID(CL_FIELD_POINT_GRAVITY, "PointGravity"); 30 30 } 31 31 … … 35 35 36 36 */ 37 PointGravity::~PointGravity () 37 PointGravity::~PointGravity () 38 38 { 39 39 // delete what has to be deleted here -
orxonox/trunk/src/lib/physics/fields/twirl.cc
r4395 r4742 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 25 25 \todo this constructor is not jet implemented - do it 26 26 */ 27 Twirl::Twirl () 27 Twirl::Twirl () 28 28 { 29 this->setClass Name ("Twirl");29 this->setClassID(CL_FIELD_TWIRL, "Twirl"); 30 30 } 31 31 … … 35 35 36 36 */ 37 Twirl::~Twirl () 37 Twirl::~Twirl () 38 38 { 39 39 // delete what has to be deleted here
Note: See TracChangeset
for help on using the changeset viewer.