Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2006, 1:16:23 PM (18 years ago)
Author:
bensch
Message:

adapted many classes to the new ClassID System, now comes the hard part… Scripting… then Network… wow this will be so bad :/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/lang/new_object_list.h

    r9684 r9685  
    88#define _NEW_OBJECT_LIST_H
    99
    10 #include "type_info.h"
     10#include "new_class_id.h"
    1111#include <map>
    1212#include <list>
     
    4040
    4141public:
    42   inline int id() const { return _id; };
    43   inline const std::string& name() const { return _name; };
    44   bool operator==(int id) const { return _id == id; };
    45   bool operator==(const std::string& name) const { return _name == name; };
     42  inline int id() const { return _identity.id(); };
     43  inline const std::string& name() const { return _identity.name(); };
     44  bool operator==(int id) const { return _identity == id; };
     45  bool operator==(const std::string& name) const { return _identity == name; };
    4646
    4747  virtual void debug() const = 0;
     
    6969  typedef std::map<std::string, NewObjectListBase*> classNameMap;//!< The Generic Map.
    7070
    71   int                           _id;                //!< The ID of the class.
    72   std::string                   _name;              //!< The Name of the Class.
     71  NewClassID                    _identity;          //!< The Identity of the Class (ID and Name).
    7372
    7473private:
     
    114113  inline const list&      objects() const { return _objects; };
    115114
     115  inline iterator begin() { return _objects.begin(); };
     116  inline const_iterator begin() const { return _objects.begin(); };
     117  inline iterator  end() { return _objects.end(); };
     118  inline const_iterator  end() const { return _objects.end(); };
     119
     120  inline bool empty() const { return _objects.empty(); };
     121  inline int size() const { return _objects.size(); };
     122  inline T* front() const { return _objects.front(); };
     123  inline T* back() const { return _objects.back(); };
     124
    116125  NewObjectListBase::IteratorBase* registerObject(T* object);
    117126  void unregisterObject(IteratorBase* iterator);
Note: See TracChangeset for help on using the changeset viewer.