Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9673 in orxonox.OLD for trunk/src/lib/lang/new_object_list.h


Ignore:
Timestamp:
Aug 21, 2006, 6:22:53 PM (18 years ago)
Author:
bensch
Message:

ClassList seems to work as it should.

File:
1 edited

Legend:

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

    r9672 r9673  
    2121   NewObjectList<ClassName> ClassName::objectList(#ClassName)
    2222
     23
     24//! The superclass that all NewObjectLists follow.
     25/**
     26 * @see template<class T> NewObjectList<T>
     27 */
    2328class NewObjectListBase
    2429{
    2530public:
     31  //! An iterator Base-Class, for iterator-casting and storing.
    2632  class IteratorBase { };
    27   struct ClassEntry{
    28     inline ClassEntry (NewObjectListBase* objectList, NewObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {}
    29     NewObjectListBase*                _objectList;
    30     NewObjectListBase::IteratorBase*  _iterator;
    31   };
    3233
    3334public:
     
    8384//! Defines a ObjectsList handler for objects of type T.
    8485/**
     86 * To define a Class with a ObjectList, you have to:
     87 *  1. Include 'NewObjectListDeclaration(T);' in its Declaration (at the beginning)
     88 *  2. Include 'NewObjectListDefinition(T);' in some Definition file (cc-file)
     89 *  3. In the constructor add 'registerObject(this, objectList);'
     90 *
    8591 * @note The Class must define the compare with const std::string& operator for this to work.
    8692 */
Note: See TracChangeset for help on using the changeset viewer.