Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9573


Ignore:
Timestamp:
Mar 24, 2013, 10:43:27 PM (12 years ago)
Author:
landauf
Message:

using Listable instead of OrxonoxClass as base class in object lists

Location:
code/branches/core6/src/libraries/core/object
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/object/Iterator.h

    r9563 r9573  
    6969        @see See @ref IteratorExample "Iterator.h" for more information an example.
    7070    */
    71     template <class T = OrxonoxClass>
     71    template <class T>
    7272    class Iterator
    7373    {
     
    295295                @param object The object to compare with
    296296            */
    297             inline void incrementIfEqual(OrxonoxClass* object)
     297            inline void incrementIfEqual(Listable* object)
    298298            {
    299299                if (this->element_ && this->element_->objectBase_ == object)
     
    305305            ObjectListBase* list_;                 //!< The list wherein the element is
    306306    };
    307 
    308     typedef Iterator<OrxonoxClass> BaseIterator;
    309307}
    310308
  • code/branches/core6/src/libraries/core/object/ObjectListBase.cc

    r9557 r9573  
    6868        @param object The object that gets removed
    6969    */
    70     void ObjectListBase::notifyIterators(OrxonoxClass* object) const
     70    void ObjectListBase::notifyIterators(Listable* object) const
    7171    {
    7272        for (std::vector<void*>::const_iterator it = this->iterators_.begin(); it != this->iterators_.end(); ++it)
    73             ((Iterator<OrxonoxClass>*)(*it))->incrementIfEqual(object);
     73            ((Iterator<Listable>*)(*it))->incrementIfEqual(object);
    7474        for (std::vector<void*>::const_iterator it = this->objectListIterators_.begin(); it != this->objectListIterators_.end(); ++it)
    75             ((ObjectListIterator<OrxonoxClass>*)(*it))->incrementIfEqual(object);
     75            ((ObjectListIterator<Listable>*)(*it))->incrementIfEqual(object);
    7676    }
    7777
  • code/branches/core6/src/libraries/core/object/ObjectListBase.h

    r9557 r9573  
    5656                @param objectBase The object to store
    5757            */
    58             ObjectListBaseElement(OrxonoxClass* objectBase) : next_(0), prev_(0), objectBase_(objectBase) {}
     58            ObjectListBaseElement(Listable* objectBase) : next_(0), prev_(0), objectBase_(objectBase) {}
    5959
    6060            ObjectListBaseElement* next_;       //!< The next element in the list
    6161            ObjectListBaseElement* prev_;       //!< The previous element in the list
    62             OrxonoxClass* objectBase_;
     62            Listable* objectBase_;
    6363    };
    6464
     
    7272    {
    7373        public:
    74             ObjectListElement(T* object) : ObjectListBaseElement(static_cast<OrxonoxClass*>(object)), object_(object) {}
     74            ObjectListElement(T* object) : ObjectListBaseElement(static_cast<Listable*>(object)), object_(object) {}
    7575            T* object_;              //!< The object
    7676    };
     
    142142                }
    143143            }
    144             void notifyIterators(OrxonoxClass* object) const;
     144            void notifyIterators(Listable* object) const;
    145145
    146146            inline Identifier* getIdentifier() const { return this->identifier_; }
  • code/branches/core6/src/libraries/core/object/ObjectListIterator.h

    r9563 r9573  
    223223                @param object The object to compare with
    224224            */
    225             inline void incrementIfEqual(OrxonoxClass* object)
     225            inline void incrementIfEqual(Listable* object)
    226226            {
    227227                if (this->element_ && this->element_->objectBase_ == object)
Note: See TracChangeset for help on using the changeset viewer.