Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 16, 2008, 7:31:18 PM (16 years ago)
Author:
landauf
Message:

big update:

  • reimplemented direct-child and direct-parent list and several related functions (get-iterator, get-list)
  • reimplemented isDirectChildOf- and isDirectParentOf-functions in Identifier, SubclassIdentifier and OrxonoxClass
  • renamed isDirectlyA to isExactlyA in Identifier, SubclassIdentifier and OrxonoxClass
  • ClassTreeMask works now with interfaces and has more possibilities (parameters for overwriting of previous rules and cleaning after adding a new function)
  • ObjectList's begin() and end() functions use ClassManager to avoid problems with libraries
  • the Factory got functions to return begin() and end() iterator for the identifier-map
  • overloaded << operator to put identifier-lists on the stream
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core/src/orxonox/core/OrxonoxClass.h

    r813 r817  
    7272            inline void createParents() { this->parents_ = new std::list<const Identifier*>(); }
    7373
    74 //            /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */
    75 //            inline void setParents(std::list<const Identifier*>* parents) { this->parents_ = parents; }
    76 
    7774            /** @brief Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. @return The list */
    7875            inline MetaObjectList& getMetaList() { return this->metaList_; }
     
    8380                { return this->getIdentifier()->isA(identifier); }
    8481            /** @brief Returns true if the objects class is exactly of the given type. */
    85             inline bool isDirectlyA(const Identifier* identifier)
    86                 { return this->getIdentifier()->isDirectlyA(identifier); }
     82            inline bool isExactlyA(const Identifier* identifier)
     83                { return this->getIdentifier()->isExactlyA(identifier); }
    8784            /** @brief Returns true if the objects class is a child of the given type. */
    8885            inline bool isChildOf(const Identifier* identifier)
    8986                { return this->getIdentifier()->isChildOf(identifier); }
     87            /** @brief Returns true if the objects class is a direct child of the given type. */
     88            inline bool isDirectChildOf(const Identifier* identifier)
     89                { return this->getIdentifier()->isDirectChildOf(identifier); }
    9090            /** @brief Returns true if the objects class is a parent of the given type. */
    9191            inline bool isParentOf(const Identifier* identifier)
    9292                { return this->getIdentifier()->isParentOf(identifier); }
     93            /** @brief Returns true if the objects class is a direct parent of the given type. */
     94            inline bool isDirectParentOf(const Identifier* identifier)
     95                { return this->getIdentifier()->isDirectParentOf(identifier); }
    9396
    9497
     
    97100                { return this->getIdentifier()->isA(identifier->getIdentifier()); }
    98101            /** @brief Returns true if the objects class is exactly of the given type. */
    99             inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
    100                 { return this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
     102            inline bool isExactlyA(const SubclassIdentifier<class B>* identifier)
     103                { return this->getIdentifier()->isExactlyA(identifier->getIdentifier()); }
    101104            /** @brief Returns true if the objects class is a child of the given type. */
    102105            inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
    103106                { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
     107            /** @brief Returns true if the objects class is a direct child of the given type. */
     108            inline bool isDirectChildOf(const SubclassIdentifier<class B>* identifier)
     109                { return this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); }
    104110            /** @brief Returns true if the objects class is a parent of the given type. */
    105111            inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
    106112                { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
     113            /** @brief Returns true if the objects class is a direct parent of the given type. */
     114            inline bool isDirectParentOf(const SubclassIdentifier<class B>* identifier)
     115                { return this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); }
    107116
    108117
     
    111120                { return this->getIdentifier()->isA(identifier.getIdentifier()); }
    112121            /** @brief Returns true if the objects class is exactly of the given type. */
    113             inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
    114                 { return this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
     122            inline bool isExactlyA(const SubclassIdentifier<class B> identifier)
     123                { return this->getIdentifier()->isExactlyA(identifier.getIdentifier()); }
    115124            /** @brief Returns true if the objects class is a child of the given type. */
    116125            inline bool isChildOf(const SubclassIdentifier<class B> identifier)
    117126                { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
     127            /** @brief Returns true if the objects class is a direct child of the given type. */
     128            inline bool isDirectChildOf(const SubclassIdentifier<class B> identifier)
     129                { return this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); }
    118130            /** @brief Returns true if the objects class is a parent of the given type. */
    119131            inline bool isParentOf(const SubclassIdentifier<class B> identifier)
    120132                { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
     133            /** @brief Returns true if the objects class is a direct parent of the given type. */
     134            inline bool isDirectParentOf(const SubclassIdentifier<class B> identifier)
     135                { return this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); }
    121136
    122137
     
    125140                { return this->getIdentifier()->isA(object->getIdentifier()); }
    126141            /** @brief Returns true if the objects class is exactly of the given type. */
    127             inline bool isDirectlyA(const OrxonoxClass* object)
    128                 { return this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
     142            inline bool isExactlyA(const OrxonoxClass* object)
     143                { return this->getIdentifier()->isExactlyA(object->getIdentifier()); }
    129144            /** @brief Returns true if the objects class is a child of the given type. */
    130145            inline bool isChildOf(const OrxonoxClass* object)
    131146                { return this->getIdentifier()->isChildOf(object->getIdentifier()); }
     147            /** @brief Returns true if the objects class is a direct child of the given type. */
     148            inline bool isDirectChildOf(const OrxonoxClass* object)
     149                { return this->getIdentifier()->isDirectChildOf(object->getIdentifier()); }
    132150            /** @brief Returns true if the objects class is a parent of the given type. */
    133151            inline bool isParentOf(const OrxonoxClass* object)
    134152                { return this->getIdentifier()->isParentOf(object->getIdentifier()); }
     153            /** @brief Returns true if the objects class is a direct child of the given type. */
     154            inline bool isDirectParentOf(const OrxonoxClass* object)
     155                { return this->getIdentifier()->isDirectParentOf(object->getIdentifier()); }
    135156
    136157
Note: See TracChangeset for help on using the changeset viewer.