Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 3, 2005, 12:56:57 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more doxygen-tags in util

File:
1 edited

Legend:

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

    r4261 r4487  
    1616/*!
    1717  \file factory.h
    18   \brief philosophy stuff
     18  \brief A loadable object handler
    1919*/
    2020
     
    3434*/
    3535#define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME)           
    36 //! The Factory is
     36
     37//! The Factory is a loadable object handler
    3738class Factory {
    3839
    3940 public:
    40   Factory (const char* name = NULL);
     41  Factory (const char* factoryName = NULL);
    4142  ~Factory ();
    4243 
     
    4546  void initialize();
    4647  void registerFactory( Factory* factory);
    47   void setFactoryName(const char* name);
    48   const char* getFactoryName() {return factoryName;};
    49   void setNext( Factory* factory) {next = factory;}
    50   Factory* getNext() {return next;}
     48  void setFactoryName(const char* factoryName);
     49  /** \returns the name of the factory */
     50  const char* getFactoryName() { return this->factoryName; };
     51  /** \brief sets the Next factory in the list \param nextFactory the next factory */
     52  inline void setNext( Factory* nextFactory) { this->next = nextFactory; };
     53  /** \returns the next factory */
     54  Factory* getNext(void) const { return this->next; };
    5155       
     56 protected:
     57  char*         factoryName;          //!< the name of the factory
    5258 private:
    53   char* factoryName;
    54        
    55   Factory* next;
     59  Factory*      next;                 //!< pointer to the next factory.
    5660};
    5761
     62/**
     63   \brief a factory that is able to load any kind of Object
     64   (this is a Functor)
     65*/
    5866template<class T> class tFactory : public Factory
    5967{
    6068 public:
    61   tFactory(const char* name);
     69  tFactory(const char* factoryName);
    6270  virtual ~tFactory();
    6371 
     
    6674};
    6775
     76/**
     77   \brief construnts a factory with
     78   \param factoryName the name of the factory
     79*/
    6880template<class T>
    69 tFactory<T>::tFactory(const char* name) : Factory(name)
     81tFactory<T>::tFactory(const char* factoryName) : Factory(factoryName)
    7082{
    71   PRINTF(5)("fileName: %s\n", name);
     83  PRINTF(5)("fileName: %s loadable\n", this->factoryName);
    7284}
    7385 
     
    90102// helper function
    91103
    92 const char* grabParameter(const TiXmlElement* root, const char* name);
     104const char* grabParameter(const TiXmlElement* root, const char* parameterName);
    93105
    94106#endif /* _FACTORY_H */
Note: See TracChangeset for help on using the changeset viewer.