Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 1, 2006, 11:56:54 PM (18 years ago)
Author:
bensch
Message:

more thoughts on Resources, and soon going to adapt… i think i've got a clue :)

File:
1 edited

Legend:

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

    r9716 r9718  
    7272  virtual void                          getBaseObjectList(base_list* list) const = 0;
    7373
    74   static const ClassID&              retrieveIdentity(int id);
    75   static const ClassID&              retrieveIdentity(const std::string& name);
    76 
    77   static const ObjectListBase* const getObjectList(int classID);
    78   static const ObjectListBase* const getObjectList(const std::string& className);
    79   static const ObjectListBase* const getObjectList(const ClassID& classID);
     74  static const ClassID&                 retrieveIdentity(int id);
     75  static const ClassID&                 retrieveIdentity(const std::string& name);
     76
     77  static const ObjectListBase* const    getObjectList(int classID);
     78  static const ObjectListBase* const    getObjectList(const std::string& className);
     79  static const ObjectListBase* const    getObjectList(const ClassID& classID);
    8080
    8181  static BaseObject*                    getBaseObject(int classID, const std::string& objectName);
     
    115115
    116116private:
    117   int                           _id;
     117  int                           _id;                //!< The Unique ID of the Class.
    118118  const std::string             _name;              //!< The Name of the Class.
    119   ClassID                    _identity;          //!< The Identity of the Class. (equal to _id and _name)
     119  ClassID                       _identity;          //!< The Identity of the Class. (equal to _id and _name)
    120120
    121121private:
     
    169169{
    170170public:
    171   typedef std::list<T*>                  list;
    172   typedef typename list::iterator        iterator;
    173   typedef typename list::const_iterator  const_iterator;
    174 
    175 
     171  typedef std::list<T*>                  list;             //!< The list of Type T* (used for Objects in this ObjectList)
     172  typedef typename list::iterator        iterator;         //!< The iterator for the List of type T (use with ObjectList<Type>::iterator)
     173  typedef typename list::const_iterator  const_iterator;   //!< A constant iterator for the List of type T (use with ObjectList<Type>::const_iterator)
     174
     175
     176  //! An iterator to store Objects in the BaseObject, and remove Objects fast.
    176177class Iterator : public ObjectListBase::IteratorBase
    177178  {
    178179  public:
    179     Iterator(iterator it) { _it = it; }
     180    /** @brief creates an Iterator fast. @param it the Iterator. */
     181    inline Iterator(iterator it) { _it = it; }
     182    /** @returns the Iterator */
    180183    inline iterator& it() { return _it; }
    181     typename ObjectList::iterator _it;
     184  private:
     185    typename ObjectList::iterator _it;  //!< Stored Iterator
    182186  };
    183187
     
    210214
    211215
    212   ObjectListBase::IteratorBase*   registerObject(T* object);
     216  ObjectListBase::IteratorBase*      registerObject(T* object);
    213217  virtual void                       unregisterObject(IteratorBase* iterator);
    214218
     
    288292 */
    289293template <class T>
    290     bool ObjectList<T>::exists(const T* const object) const
     294bool ObjectList<T>::exists(const T* const object) const
    291295{
    292296  return (std::find(_objects.begin(), _objects.end(), object) != _objects.end());
Note: See TracChangeset for help on using the changeset viewer.