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/OrxonoxClass.cc

    r1505 r1574  
    3939{
    4040    /** @brief Constructor: Sets the default values. */
    41     OrxonoxClass::OrxonoxClass() :
    42       identifier_(0),
    43       parents_(0)
     41    OrxonoxClass::OrxonoxClass()
    4442    {
     43        this->identifier_ = 0;
     44        this->parents_ = 0;
    4545        this->metaList_ = new MetaObjectList();
    4646
Note: See TracChangeset for help on using the changeset viewer.