Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10114 in orxonox.OLD for trunk/src/lib/lang/object_list.h


Ignore:
Timestamp:
Dec 19, 2006, 11:55:26 PM (17 years ago)
Author:
patrick
Message:

merged network back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/object_list.h

    r9869 r10114  
    3232 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
    3333 * @param ClassName: the Name of the Class.
    34  * @param ID: optional set a Fixed ID.
    35  */
    36 #define ObjectListDefinitionID(ClassName, ID) \
    37    ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
    38 
    39 /**
    40  * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
    41  * @param ClassName: the Name of the Class.
    4234 */
    4335#define ObjectListDefinition(ClassName) \
    44     ObjectListDefinitionID(ClassName, -1)
     36    ObjectList<ClassName> ClassName::_objectList(#ClassName)
    4537
    4638class BaseObject;
     
    109101
    110102protected:
    111   ObjectListBase(const std::string& className, int id = -1);
     103  ObjectListBase(const std::string& className);
    112104  virtual ~ObjectListBase();
    113105
     
    133125  static NameMap*               _classesByName;     //!< A Map of all the classes in existance.
    134126  static std::list<std::string> _classNames;        //!< A list of all the registered ClassNames.
     127
     128public:
     129  static void replaceIDMap( const std::map<std::string, int>& str2id );
     130  static std::map<std::string, int>* createStrToId();
    135131};
    136132
     
    199195
    200196public:
    201   ObjectList(const std::string& name, int id = -1);
     197  ObjectList(const std::string& name);
    202198  ~ObjectList();
    203199
     
    256252 */
    257253template <class T>
    258 ObjectList<T>::ObjectList(const std::string& name, int id)
    259     : ObjectListBase(name, id)
     254ObjectList<T>::ObjectList(const std::string& name)
     255    : ObjectListBase(name)
    260256{}
    261257
Note: See TracChangeset for help on using the changeset viewer.