Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2007, 2:07:01 AM (17 years ago)
Author:
landauf
Message:

moved common object-functions and -variables (like isA() and name_) from BaseObject to OrxonoxClass, so they can still be used while iterating through a list of objects inheriting from an interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/BaseObject.h

    r258 r366  
    1111            BaseObject();
    1212            virtual ~BaseObject();
    13 
    14             inline bool isA(const Identifier* identifier)
    15                 { this->getIdentifier()->isA(identifier); }
    16             inline bool isDirectlyA(const Identifier* identifier)
    17                 { this->getIdentifier()->isDirectlyA(identifier); }
    18             inline bool isChildOf(const Identifier* identifier)
    19                 { this->getIdentifier()->isChildOf(identifier); }
    20             inline bool isParentOf(const Identifier* identifier)
    21                 { this->getIdentifier()->isParentOf(identifier); }
    22 
    23             inline bool isA(const SubclassIdentifier<class B>* identifier)
    24                 { this->getIdentifier()->isA(identifier->getIdentifier()); }
    25             inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
    26                 { this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
    27             inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
    28                 { this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
    29             inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
    30                 { this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
    31 
    32             inline bool isA(const SubclassIdentifier<class B> identifier)
    33                 { this->getIdentifier()->isA(identifier.getIdentifier()); }
    34             inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
    35                 { this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
    36             inline bool isChildOf(const SubclassIdentifier<class B> identifier)
    37                 { this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
    38             inline bool isParentOf(const SubclassIdentifier<class B> identifier)
    39                 { this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
    40 
    41             inline bool isA(const OrxonoxClass* object)
    42                 { this->getIdentifier()->isA(object->getIdentifier()); }
    43             inline bool isDirectlyA(const OrxonoxClass* object)
    44                 { this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
    45             inline bool isChildOf(const OrxonoxClass* object)
    46                 { this->getIdentifier()->isChildOf(object->getIdentifier()); }
    47             inline bool isParentOf(const OrxonoxClass* object)
    48                 { this->getIdentifier()->isParentOf(object->getIdentifier()); }
    49 
    50             std::string name_; // test
    51 
    5213    };
    5314}
Note: See TracChangeset for help on using the changeset viewer.