Changeset 4436 in orxonox.OLD for orxonox/trunk/src/lib/lang
- Timestamp:
- Jun 1, 2005, 12:50:07 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/lang
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/lang/base_object.cc
r4435 r4436 18 18 19 19 #include "base_object.h" 20 #include "stdincl.h" 21 20 #include "load_param.h" 22 21 23 22 using namespace std; … … 25 24 26 25 /** 27 \brief standard constructor 26 \brief sets the name from a LoadXML-Element 27 \param root the element to load from 28 28 */ 29 BaseObject::BaseObject ()29 BaseObject::BaseObject(const TiXmlElement* root) 30 30 { 31 31 this->className = NULL; … … 34 34 35 35 this->objectName = NULL; 36 37 if (root) 38 this->loadParams(root); 36 39 } 37 38 40 39 41 /** … … 47 49 } 48 50 51 /** 52 \brief loads parameters 53 \param root the element to load from 54 */ 55 void BaseObject::loadParams(const TiXmlElement* root) 56 { 57 // name setup 58 LoadParam<BaseObject>(root, "name", this, &BaseObject::setName) 59 .describe("the name of the Object at hand"); 60 } 49 61 50 62 /** -
orxonox/trunk/src/lib/lang/base_object.h
r4435 r4436 9 9 10 10 #include "class_list.h" 11 #ifndef NULL 12 #define NULL 0x0 13 #endif 14 15 class TiXmlElement; 11 16 12 17 //! A class all other classes are derived from … … 14 19 15 20 public: 16 BaseObject ( );21 BaseObject (const TiXmlElement* root = NULL); 17 22 virtual ~BaseObject (); 23 24 void loadParams(const TiXmlElement* root); 18 25 19 26 void setClassID(int id);
Note: See TracChangeset
for help on using the changeset viewer.