Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4020 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 3, 2005, 12:48:25 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: renaming from factory→className → factory→factoryName

Location:
orxonox/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/factory.cc

    r4019 r4020  
    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->classname = NULL;
    35   this->setClassname(name);
     34  this->factoryName = NULL;
     35  this->setFactoryName(name);
    3636  next = NULL;
    3737 
     
    4646Factory::~Factory ()
    4747{
    48   //  printf("%s\n", this->classname);
     48  //  printf("%s\n", this->factoryName);
    4949  //  Factory* tmpDel = this->next;
    5050  //  this->next = NULL;
     
    5353}
    5454
    55 void Factory::setClassname(const char* name)
     55void Factory::setFactoryName(const char* name)
    5656{
    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);
    6161}
    6262
  • orxonox/trunk/src/factory.h

    r4010 r4020  
    3333  void initialize();
    3434  void registerFactory( Factory* factory);
    35   void setClassname(const char* name);
    36   const char* getClassname() {return classname;};
     35  void setFactoryName(const char* name);
     36  const char* getFactoryName() {return factoryName;};
    3737  void setNext( Factory* factory) {next = factory;}
    3838  Factory* getNext() {return next;}
    3939       
    4040 private:
    41   char* classname;
     41  char* factoryName;
    4242       
    4343  Factory* next;
     
    6868BaseObject* tFactory<T>::fabricate( TiXmlElement* root)
    6969{
    70   if(!strcmp(root->Value(), getClassname()))
     70  if(!strcmp(root->Value(), getFactoryName()))
    7171    return new T ( root);
    7272  else if( getNext() != NULL)
  • orxonox/trunk/src/game_loader.cc

    r4017 r4020  
    279279        assert( factory != NULL);
    280280       
    281         PRINTF0("Registered factory for '%s'\n", factory->getClassname());
     281        PRINTF0("Registered factory for '%s'\n", factory->getFactoryName());
    282282       
    283283        if( first == NULL) first = factory;
  • orxonox/trunk/src/lib/graphics/importer/model.cc

    r3917 r4020  
    211211{
    212212  if (this->name)
    213     delete this->name;
     213    delete []this->name;
    214214  if (name)
    215215    {
Note: See TracChangeset for help on using the changeset viewer.