Changeset 4217 in orxonox.OLD for orxonox/branches/movie_player/src/factory.cc
- Timestamp:
- May 18, 2005, 11:27:40 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/movie_player/src/factory.cc
r4010 r4217 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->setClassname(name); 34 this->factoryName = NULL; 35 this->setFactoryName(name); 35 36 next = NULL; 36 37 … … 45 46 Factory::~Factory () 46 47 { 47 // printf("%s\n", this-> classname);48 // printf("%s\n", this->factoryName); 48 49 // Factory* tmpDel = this->next; 49 50 // this->next = NULL; … … 52 53 } 53 54 54 void Factory::set Classname(const char* name)55 void Factory::setFactoryName(const char* name) 55 56 { 56 if ( classname)57 delete classname;58 classname = new char[strlen(name)+1];59 strcpy( classname, name);57 if (factoryName) 58 delete factoryName; 59 factoryName = new char[strlen(name)+1]; 60 strcpy(factoryName, name); 60 61 } 61 62 … … 74 75 void Factory::initialize() 75 76 { 76 assert( classname != NULL);77 77 GameLoader* gl = GameLoader::getInstance(); 78 78 gl->registerFactory( this);
Note: See TracChangeset
for help on using the changeset viewer.