Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2006, 7:42:16 PM (18 years ago)
Author:
bensch
Message:

stuff from yesterday

File:
1 edited

Legend:

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

    r9724 r9726  
    99
    1010#include "class_id.h"
    11 #include <cassert>
    1211#include <map>
    1312#include <list>
    1413#include <string>
     14
     15#include <cassert>
    1516#include <iostream>
    1617
     
    101102  static int                            StringToID(const std::string& className);
    102103
    103   //! Only uset to unsubscribe a BaseObject.
     104  //! Only used to unsubscribe a BaseObject. (just try to make a valid iterator, stupid :))
    104105  virtual void                          unregisterObject(IteratorBase* _iterators) = 0;
    105106
     
    117118
    118119protected:
    119   typedef std::map<int, ObjectListBase*>         classIDMap;   //!< The Generic Map.
    120   typedef std::map<std::string, ObjectListBase*> classNameMap; //!< The Generic Map.
     120  typedef std::map<int, ObjectListBase*>         IDMap;   //!< The Generic Map.
     121  typedef std::map<std::string, ObjectListBase*> NameMap; //!< The Generic Map.
    121122
    122123private:
     
    126127
    127128private:
    128   static classIDMap*            _classesByID;       //!< A Map of all the classes in existance.
    129   static classNameMap*          _classesByName;     //!< A Map of all the classes in existance.
     129  static IDMap*                 _classesByID;       //!< A Map of all the classes in existance.
     130  static NameMap*               _classesByName;     //!< A Map of all the classes in existance.
    130131  static std::list<std::string> _classNames;        //!< A list of all the registered ClassNames.
    131132};
     
    135136//// TEMPLATISATION /////
    136137/////////////////////////
    137 //! Defines a ObjectsList handler for objects of type T.
     138//! Defines a ObjectList handler for objects of type T.
    138139/**
    139140 * The ObjectList is a generic way to store every object created from a Class 'T'
    140  *  into a List. The list can be retrieved, and used constantly over iterators,
     141 *  in a List. The list can be retrieved, and used constantly over iterators,
    141142 *  as with normal std::list.
    142143 *
    143144 * Furthermore the linkage over the single Lists is given over the Superclass ObjectListBase.
    144145 *
    145  *
    146  *
     146 * The approach of ObjectList is an intrusive one, meaning, that each Class that wants to
     147 * support it must implement a Declaration and a Definition for the ObjectList, as mentioned
     148 * in the next statement:
    147149 *
    148150 * To define a Class with a ObjectList, you have to:
     
    152154 *
    153155 * @note The Class must define the compare with const std::string& operator for this to work.
     156 *  The operator==(const std::string& name) should compare the object's name with name.
    154157 *
    155158 *
Note: See TracChangeset for help on using the changeset viewer.