Changeset 4020 in orxonox.OLD for orxonox/trunk/src/factory.cc
- Timestamp:
- May 3, 2005, 12:48:25 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/factory.cc
r4019 r4020 28 28 \brief constructor 29 29 30 set everything to zero and define classname30 set everything to zero and define factoryName 31 31 */ 32 32 Factory::Factory (const char* name) 33 33 { 34 this-> classname = NULL;35 this->set Classname(name);34 this->factoryName = NULL; 35 this->setFactoryName(name); 36 36 next = NULL; 37 37 … … 46 46 Factory::~Factory () 47 47 { 48 // printf("%s\n", this-> classname);48 // printf("%s\n", this->factoryName); 49 49 // Factory* tmpDel = this->next; 50 50 // this->next = NULL; … … 53 53 } 54 54 55 void Factory::set Classname(const char* name)55 void Factory::setFactoryName(const char* name) 56 56 { 57 if ( classname)58 delete classname;59 classname = new char[strlen(name)+1];60 strcpy( classname, name);57 if (factoryName) 58 delete factoryName; 59 factoryName = new char[strlen(name)+1]; 60 strcpy(factoryName, name); 61 61 } 62 62
Note: See TracChangeset
for help on using the changeset viewer.