Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 8, 2006, 12:20:55 PM (18 years ago)
Author:
bensch
Message:

many many documentations and one new functiopm

File:
1 edited

Legend:

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

    r9718 r9724  
    2828   static ObjectList<ClassName> _objectList
    2929
     30/**
     31 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
     32 * @param ClassName: the Name of the Class.
     33 * @param ID: optional set a Fixed ID.
     34 */
    3035#define ObjectListDefinitionID(ClassName, ID) \
    3136   ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
    3237
    33 
     38/**
     39 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
     40 * @param ClassName: the Name of the Class.
     41 */
    3442#define ObjectListDefinition(ClassName) \
    3543    ObjectListDefinitionID(ClassName, -1)
     
    4351{
    4452public:
    45   //! A fast iterator Base-Class, for iterator-casting and storing.
    46   /**
    47    * @note This Iterator is explicitely used only for storage purposes in the BaseObject
    48    */
    49   class IteratorBase { };
    50 
    5153  /** @brief A Typedefinition for the Base-List that can be retrieved with getBaseObjectList(base_list*) */
    5254  typedef std::list<BaseObject*>        base_list;
    5355  /** @brief An iterator for the base_list */
    5456  typedef base_list::iterator           base_iterator;
     57  //! A fast iterator Base-Class, for iterator-casting and storing.
     58  /** @note This Iterator is explicitely used only for storage purposes in the BaseObject */
     59  class IteratorBase { };
    5560
    5661public:
    5762  /** @returns The Identity of the Class stored within. */
    58   inline const ClassID&              identity() const { return _identity; }
     63  inline const ClassID&                 identity() const { return _identity; }
    5964  /** @returns the ID of the Identity of the ObjectList */
    6065  inline int                            id() const { return _id; };
     
    6772  /** @param name The name to compare @returns true on match, false otherwise */
    6873  inline bool                           operator==(const std::string& name) const { return _name == name; };
    69   /** @param id The id to check @returns true on match, false otherwise */
     74  /** @param id The id to acquire @param name the Name to acquire @brief stores a Name and an ID in a pointer. */
    7075  inline void                           acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
    7176  /** @brief fills a list of Objects into a BaseObject*-List. @param list the list to fill */
     
    104109
    105110private:
    106   ObjectListBase(const ObjectListBase&);
     111  /** @brief hidden copy constructor. */
     112  ObjectListBase(const ObjectListBase&) {};
    107113
    108114  static bool                         classIDExists(int id);
     
    153159 *   and not loaded before the ObjectList.
    154160 *
    155  * @example Iterating: Iteration is made easy, and fast as follows:
     161 * example: Iterating: Iteration is made easy, and fast as follows:
    156162 *   for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
    157163 *      it != PlayerStats::objectList().end();
     
    161167 *   }
    162168 *
    163  * @example Find an Object:
     169 * example: Find an Object:
    164170 * Playable* playable = Playable::objectList("orxonox-super-rocket-fighter"); // searches an Object By its name.
    165171 *
     
    192198  virtual BaseObject*                getBaseObject(const std::string& name) const;
    193199  T*                                 getObject(const std::string& name) const;
     200  /** @returns A constant list of Objects of this Class. */
    194201  inline const list&                 objects() const { return _objects; };
    195202  bool                               exists(const T* const object) const;
     
    314321/**
    315322 * @brief registers an Object to the ObjectList.
    316  * @param T object the Object to register.
     323 * @param object The Object to register.
    317324 * @returns a pointer to the iterator inside of the list.
    318325 */
Note: See TracChangeset for help on using the changeset viewer.