Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4729 in orxonox.OLD for orxonox/trunk/src/util/loading/factory.h


Ignore:
Timestamp:
Jun 29, 2005, 12:05:16 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: factory-fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/loading/factory.h

    r4597 r4729  
    4848  void initialize();
    4949  void registerFactory( Factory* factory);
    50   void setFactoryName(const char* factoryName);
    51   /** \returns the name of the factory */
    52   const char* getFactoryName() { return this->factoryName; };
    5350  /** \brief sets the Next factory in the list \param nextFactory the next factory */
    5451  inline void setNext( Factory* nextFactory) { this->next = nextFactory; };
     
    5653  Factory* getNext(void) const { return this->next; };
    5754
    58  protected:
    59   char*         factoryName;          //!< the name of the factory
    6055 private:
    61   Factory*      next;                 //!< pointer to the next factory.
     56  Factory*          next;                 //!< pointer to the next factory.
     57  static Factory*   first;                //!< A pointer to the first factory.
    6258};
    6359
     
    8379tFactory<T>::tFactory(const char* factoryName) : Factory(factoryName)
    8480{
    85   PRINTF(5)("fileName: %s loadable\n", this->factoryName);
     81  PRINTF(5)("fileName: %s loadable\n", this->getName());
    8682}
    8783
     
    9490BaseObject* tFactory<T>::fabricate(const TiXmlElement* root)
    9591{
    96   if(!strcmp(root->Value(), getFactoryName()))
     92  if(!strcmp(root->Value(), getName()))
    9793    return new T ( root);
    9894  else if( getNext() != NULL)
Note: See TracChangeset for help on using the changeset viewer.