Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2008, 4:35:38 AM (16 years ago)
Author:
landauf
Message:

big change in ObjectList: separated the class into a non-template base and a template wrapper for the base. this also changes the Iterator, there is now a non-template IteratorBase. this brings much more flexibility, like iterating through all objects of a given identifier without knowing the type. however this needs a dynamic_cast, which isn't quite optimal, but I think there are much worser things than that out there. ;)

there isn't much you have to know about this, except there is no more ObjectList<myClass>::start() function but a ObjectList<myClass>::begin() to be more STLish. another thing: ObjectList<myClass>::end() points now to the element _after_ the last element, so it's possible to iterate in a for-loop until (it != ObjectList<myClass>::end()). the reason is the same as above. however, (it) as a boolean still works perfectly fine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/core/CorePrereqs.h

    r1543 r1574  
    125125  template <class T>
    126126  class Iterator;
     127  class IteratorBase;
    127128  class Language;
    128129  class LanguageEntry;
     
    130131  class Loader;
    131132  class MetaObjectList;
    132   template <class T>
    133133  class MetaObjectListElement;
    134134  class Namespace;
     
    136136  template <class T>
    137137  class ObjectList;
    138   template <class T>
    139   class ObjectListElement;
     138  class ObjectListBase;
     139  class ObjectListBaseElement;
    140140  class OrxonoxClass;
    141141  class OutputBuffer;
Note: See TracChangeset for help on using the changeset viewer.