Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4217 in orxonox.OLD for orxonox/branches/movie_player/src/factory.cc


Ignore:
Timestamp:
May 18, 2005, 11:27:40 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/movie_player: merged the trunk back into the movie_player
merged with command:
svn merge -r 4014:HEAD ../trunk/ movie_player/
no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/movie_player/src/factory.cc

    r4010 r4217  
    2828   \brief constructor
    2929   
    30    set everything to zero and define classname
     30   set everything to zero and define factoryName
    3131*/
    3232Factory::Factory (const char* name)
    3333{
    34   this->setClassname(name);
     34  this->factoryName = NULL;
     35  this->setFactoryName(name);
    3536  next = NULL;
    3637 
     
    4546Factory::~Factory ()
    4647{
    47   //  printf("%s\n", this->classname);
     48  //  printf("%s\n", this->factoryName);
    4849  //  Factory* tmpDel = this->next;
    4950  //  this->next = NULL;
     
    5253}
    5354
    54 void Factory::setClassname(const char* name)
     55void Factory::setFactoryName(const char* name)
    5556{
    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);
    6061}
    6162
     
    7475void Factory::initialize()
    7576{
    76   assert( classname != NULL);
    7777  GameLoader* gl = GameLoader::getInstance();
    7878  gl->registerFactory( this);
Note: See TracChangeset for help on using the changeset viewer.