Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 13, 2009, 5:05:17 PM (15 years ago)
Author:
dafrick
Message:

Hopefully merged trunk successfully into pickup branch.

Location:
code/branches/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup

  • code/branches/pickup/src/libraries/core/Identifier.h

    r5781 r5935  
    2929/**
    3030    @file
    31     @brief Definition of the Identifier, ClassIdentifier and SubclassIdentifier classes, implementation of the ClassIdentifier and SubclassIdentifier classes.
     31    @brief Definition of the Identifier class, definition and implementation of the ClassIdentifier class.
    3232
    3333    The Identifier contains all needed information about the class it belongs to:
     
    4545
    4646    Every Identifier is in fact a ClassIdentifier, but they are derived from Identifier.
    47 
    48     SubclassIdentifier is a separated class, acting like an Identifier, but has a given class.
    49     You can only assign Identifiers of exactly the given class or of a derivative to a SubclassIdentifier.
    5047*/
    5148
     
    9087    class _CoreExport Identifier
    9188    {
    92         template <class T>
    93         friend class SubclassIdentifier;
    94 
    95         friend class Factory;
    96 
    9789        public:
     90            /** @brief Returns the name of the class the Identifier belongs to. @return The name */
     91            inline const std::string& getName() const { return this->name_; }
     92            void setName(const std::string& name);
     93
     94            /** @brief Returns the network ID to identify a class through the network. @return the network ID */
     95            inline const uint32_t getNetworkID() const { return this->networkID_; }
     96            void setNetworkID(uint32_t id);
     97
     98            /** @brief Returns the unique ID of the class */
     99            FORCEINLINE unsigned int getClassID() const { return this->classID_; }
     100
     101            /** @brief Returns the list of all existing objects of this class. @return The list */
     102            inline ObjectListBase* getObjects() const { return this->objects_; }
     103
    98104            /** @brief Sets the Factory. @param factory The factory to assign */
    99             inline void addFactory(BaseFactory* factory) { this->factory_ = factory; }
     105            inline void addFactory(Factory* factory) { this->factory_ = factory; }
     106            /** @brief Returns true if the Identifier has a Factory. */
     107            inline bool hasFactory() const { return (this->factory_ != 0); }
    100108
    101109            BaseObject* fabricate(BaseObject* creator);
     110
     111            /** @brief Returns true if the class can be loaded through XML. */
     112            inline bool isLoadable() const { return this->bLoadable_; }
     113            /** @brief Set the class to be loadable through XML or not. */
     114            inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; }
     115
    102116            bool isA(const Identifier* identifier) const;
    103117            bool isExactlyA(const Identifier* identifier) const;
     
    107121            bool isDirectParentOf(const Identifier* identifier) const;
    108122
    109             /** @brief Returns true if the class can be loaded through XML. */
    110             inline bool isLoadable() const { return this->bLoadable_; }
    111             /** @brief Set the class to be loadable through XML or not. */
    112             inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; }
    113 
    114             /** @brief Returns the list of all existing objects of this class. @return The list */
    115             inline ObjectListBase* getObjects() const
    116                 { return this->objects_; }
    117 
    118             /** @brief Returns the name of the class the Identifier belongs to. @return The name */
    119             inline const std::string& getName() const { return this->name_; }
    120             void setName(const std::string& name);
    121 
    122             virtual void updateConfigValues(bool updateChildren = true) const = 0;
     123
     124            /////////////////////////////
     125            ////// Class Hierarchy //////
     126            /////////////////////////////
     127            static void createClassHierarchy();
     128
     129            /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
     130            inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
    123131
    124132            /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */
     
    130138
    131139            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
    132             inline const std::set<const Identifier*>& getChildren() const { return (*this->children_); }
     140            inline const std::set<const Identifier*>& getChildren() const { return this->children_; }
    133141            /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */
    134             inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); }
     142            inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_.begin(); }
    135143            /** @brief Returns the end-iterator of the children-list. @return The end-iterator */
    136             inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); }
     144            inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_.end(); }
    137145
    138146            /** @brief Returns the direct parents of the class the Identifier belongs to. @return The list of all direct parents */
     
    144152
    145153            /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */
    146             inline const std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }
     154            inline const std::set<const Identifier*>& getDirectChildren() const { return this->directChildren_; }
    147155            /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */
    148             inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); }
     156            inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_.begin(); }
    149157            /** @brief Returns the end-iterator of the direct-children-list. @return The end-iterator */
    150             inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }
    151 
    152 
    153             /** @brief Returns the map that stores all Identifiers. @return The map */
    154             static inline const std::map<std::string, Identifier*>& getIdentifierMap() { return Identifier::getIdentifierMapIntern(); }
    155             /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers. @return The const_iterator */
    156             static inline std::map<std::string, Identifier*>::const_iterator getIdentifierMapBegin() { return Identifier::getIdentifierMap().begin(); }
    157             /** @brief Returns a const_iterator to the end of the map that stores all Identifiers. @return The const_iterator */
    158             static inline std::map<std::string, Identifier*>::const_iterator getIdentifierMapEnd() { return Identifier::getIdentifierMap().end(); }
     158            inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_.end(); }
     159
     160
     161            //////////////////////////
     162            ///// Identifier Map /////
     163            //////////////////////////
     164            static void destroyAllIdentifiers();
     165
     166            static Identifier* getIdentifierByString(const std::string& name);
     167            static Identifier* getIdentifierByLowercaseString(const std::string& name);
     168            static Identifier* getIdentifierByID(uint32_t id);
     169
     170            static void clearNetworkIDs();
     171
     172            /** @brief Returns the map that stores all Identifiers with their names. @return The map */
     173            static inline const std::map<std::string, Identifier*>& getStringIdentifierMap() { return Identifier::getStringIdentifierMapIntern(); }
     174            /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers with their names. @return The const_iterator */
     175            static inline std::map<std::string, Identifier*>::const_iterator getStringIdentifierMapBegin() { return Identifier::getStringIdentifierMap().begin(); }
     176            /** @brief Returns a const_iterator to the end of the map that stores all Identifiers with their names. @return The const_iterator */
     177            static inline std::map<std::string, Identifier*>::const_iterator getStringIdentifierMapEnd() { return Identifier::getStringIdentifierMap().end(); }
    159178
    160179            /** @brief Returns the map that stores all Identifiers with their names in lowercase. @return The map */
    161             static inline const std::map<std::string, Identifier*>& getLowercaseIdentifierMap() { return Identifier::getLowercaseIdentifierMapIntern(); }
     180            static inline const std::map<std::string, Identifier*>& getLowercaseStringIdentifierMap() { return Identifier::getLowercaseStringIdentifierMapIntern(); }
    162181            /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers with their names in lowercase. @return The const_iterator */
    163             static inline std::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapBegin() { return Identifier::getLowercaseIdentifierMap().begin(); }
     182            static inline std::map<std::string, Identifier*>::const_iterator getLowercaseStringIdentifierMapBegin() { return Identifier::getLowercaseStringIdentifierMap().begin(); }
    164183            /** @brief Returns a const_iterator to the end of the map that stores all Identifiers with their names in lowercase. @return The const_iterator */
    165             static inline std::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapEnd() { return Identifier::getLowercaseIdentifierMap().end(); }
    166 
     184            static inline std::map<std::string, Identifier*>::const_iterator getLowercaseStringIdentifierMapEnd() { return Identifier::getLowercaseStringIdentifierMap().end(); }
     185
     186            /** @brief Returns the map that stores all Identifiers with their IDs. @return The map */
     187            static inline const std::map<uint32_t, Identifier*>& getIDIdentifierMap() { return Identifier::getIDIdentifierMapIntern(); }
     188            /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers with their IDs. @return The const_iterator */
     189            static inline std::map<uint32_t, Identifier*>::const_iterator getIDIdentifierMapBegin() { return Identifier::getIDIdentifierMap().begin(); }
     190            /** @brief Returns a const_iterator to the end of the map that stores all Identifiers with their IDs. @return The const_iterator */
     191            static inline std::map<uint32_t, Identifier*>::const_iterator getIDIdentifierMapEnd() { return Identifier::getIDIdentifierMap().end(); }
     192
     193
     194            /////////////////////////
     195            ///// Config Values /////
     196            /////////////////////////
     197            virtual void updateConfigValues(bool updateChildren = true) const = 0;
     198
     199            /** @brief Returns true if this class has at least one config value. @return True if this class has at least one config value */
     200            inline bool hasConfigValues() const { return this->bHasConfigValues_; }
    167201
    168202            /** @brief Returns the map that stores all config values. @return The const_iterator */
     
    180214            inline std::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapEnd() const { return this->configValues_LC_.end(); }
    181215
     216            void addConfigValueContainer(const std::string& varname, ConfigValueContainer* container);
     217            ConfigValueContainer* getConfigValueContainer(const std::string& varname);
     218            ConfigValueContainer* getLowercaseConfigValueContainer(const std::string& varname);
     219
     220
     221            ////////////////////////////
     222            ///// Console Commands /////
     223            ////////////////////////////
     224            /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */
     225            inline bool hasConsoleCommands() const { return this->bHasConsoleCommands_; }
    182226
    183227            /** @brief Returns the map that stores all console commands. @return The const_iterator */
     
    195239            inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }
    196240
     241            ConsoleCommand& addConsoleCommand(ConsoleCommand* command, bool bCreateShortcut);
     242            ConsoleCommand* getConsoleCommand(const std::string& name) const;
     243            ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
     244
     245
     246            ///////////////////
     247            ///// XMLPort /////
     248            ///////////////////
    197249            /** @brief Returns the map that stores all XMLPort params. @return The const_iterator */
    198250            inline const std::map<std::string, XMLPortParamContainer*>& getXMLPortParamMap() const { return this->xmlportParamContainers_; }
     
    209261            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapEnd() const { return this->xmlportObjectContainers_.end(); }
    210262
    211             /** @brief Returns the map that stores all XMLPort events. @return The const_iterator */
    212             inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortEventMap() const { return this->xmlportEventContainers_; }
    213             /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort events. @return The const_iterator */
    214             inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortEventMapBegin() const { return this->xmlportEventContainers_.begin(); }
    215             /** @brief Returns a const_iterator to the end of the map that stores all XMLPort events. @return The const_iterator */
    216             inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortEventMapEnd() const { return this->xmlportEventContainers_.end(); }
    217 
    218             /** @brief Returns true if this class has at least one config value. @return True if this class has at least one config value */
    219             inline bool hasConfigValues() const { return this->bHasConfigValues_; }
    220             /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */
    221             inline bool hasConsoleCommands() const { return this->bHasConsoleCommands_; }
    222 
    223             /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
    224             inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
    225 
    226             /** @brief Returns the network ID to identify a class through the network. @return the network ID */
    227             inline const uint32_t getNetworkID() const { return this->networkID_; }
    228 
    229             /** @brief Sets the network ID to a new value. @param id The new value */
    230             void setNetworkID(uint32_t id);
    231 
    232             /** @brief Returns the unique ID of the class */
    233             FORCEINLINE unsigned int getClassID() const { return this->classID_; }
    234 
    235             void addConfigValueContainer(const std::string& varname, ConfigValueContainer* container);
    236             ConfigValueContainer* getConfigValueContainer(const std::string& varname);
    237             ConfigValueContainer* getLowercaseConfigValueContainer(const std::string& varname);
    238 
    239263            void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container);
    240264            XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname);
     
    243267            XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname);
    244268
    245             void addXMLPortEventContainer(const std::string& eventname, XMLPortObjectContainer* container);
    246             XMLPortObjectContainer* getXMLPortEventContainer(const std::string& eventname);
    247 
    248             ConsoleCommand& addConsoleCommand(ConsoleCommand* command, bool bCreateShortcut);
    249             ConsoleCommand* getConsoleCommand(const std::string& name) const;
    250             ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
    251 
    252             void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
    253 
    254             static void destroyAllIdentifiers();
    255269
    256270        protected:
     
    262276            virtual void createSuperFunctionCaller() const = 0;
    263277
    264             /** @brief Returns the map that stores all Identifiers. @return The map */
    265             static std::map<std::string, Identifier*>& getIdentifierMapIntern();
     278            void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
     279
     280            /** @brief Returns the map that stores all Identifiers with their names. @return The map */
     281            static std::map<std::string, Identifier*>& getStringIdentifierMapIntern();
    266282            /** @brief Returns the map that stores all Identifiers with their names in lowercase. @return The map */
    267             static std::map<std::string, Identifier*>& getLowercaseIdentifierMapIntern();
     283            static std::map<std::string, Identifier*>& getLowercaseStringIdentifierMapIntern();
     284            /** @brief Returns the map that stores all Identifiers with their network IDs. @return The map */
     285            static std::map<uint32_t, Identifier*>& getIDIdentifierMapIntern();
    268286
    269287            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
    270             inline std::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); }
     288            inline std::set<const Identifier*>& getChildrenIntern() const { return this->children_; }
    271289            /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */
    272             inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
     290            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return this->directChildren_; }
    273291
    274292            ObjectListBase* objects_;                                      //!< The list of all objects of this class
    275293
    276294        private:
    277             /**
    278                 @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
    279             */
    280             inline static void startCreatingHierarchy()
    281             {
    282                 hierarchyCreatingCounter_s++;
    283                 COUT(4) << "*** Identifier: Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
    284             }
    285 
    286             /**
    287                 @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
    288             */
    289             inline static void stopCreatingHierarchy()
    290             {
    291                 hierarchyCreatingCounter_s--;
    292                 COUT(4) << "*** Identifier: Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
    293             }
     295            /** @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents. */
     296            inline static void startCreatingHierarchy() { hierarchyCreatingCounter_s++; }
     297            /** @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents. */
     298            inline static void stopCreatingHierarchy()  { hierarchyCreatingCounter_s--; }
    294299
    295300            static std::map<std::string, Identifier*>& getTypeIDIdentifierMap();
     
    298303
    299304            std::set<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to
    300             std::set<const Identifier*>* children_;                        //!< The children of the class the Identifier belongs to
     305            mutable std::set<const Identifier*> children_;                 //!< The children of the class the Identifier belongs to
    301306
    302307            std::set<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to
    303             std::set<const Identifier*>* directChildren_;                  //!< The direct children of the class the Identifier belongs to
     308            mutable std::set<const Identifier*> directChildren_;           //!< The direct children of the class the Identifier belongs to
    304309
    305310            bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
     
    307312            bool bLoadable_;                                               //!< False = it's not permitted to load the object through XML
    308313            std::string name_;                                             //!< The name of the class the Identifier belongs to
    309             BaseFactory* factory_;                                         //!< The Factory, able to create new objects of the given class (if available)
     314            Factory* factory_;                                             //!< The Factory, able to create new objects of the given class (if available)
    310315            static int hierarchyCreatingCounter_s;                         //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
    311316            uint32_t networkID_;                                           //!< The network ID to identify a class through the network
     
    323328            std::map<std::string, XMLPortParamContainer*> xmlportParamContainers_;     //!< All loadable parameters
    324329            std::map<std::string, XMLPortObjectContainer*> xmlportObjectContainers_;   //!< All attachable objects
    325             std::map<std::string, XMLPortObjectContainer*> xmlportEventContainers_;    //!< All events
    326330    };
    327331
     
    348352
    349353        public:
    350             static ClassIdentifier<T> *getIdentifier();
    351             static ClassIdentifier<T> *getIdentifier(const std::string& name);
     354            static ClassIdentifier<T>* getIdentifier();
     355            static ClassIdentifier<T>* getIdentifier(const std::string& name);
    352356
    353357            bool initialiseObject(T* object, const std::string& className, bool bRootClass);
     
    380384    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
    381385    {
    382         // check if the static field has already been filled
    383         if (ClassIdentifier<T>::classIdentifier_s == 0)
     386        // check if the Identifier already exists
     387        if (!ClassIdentifier<T>::classIdentifier_s)
    384388            ClassIdentifier<T>::initialiseIdentifier();
    385389
     
    508512#endif
    509513    }
    510 
    511 
    512     // ###############################
    513     // ###   SubclassIdentifier    ###
    514     // ###############################
    515     //! The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
    516     /**
    517         You can only assign an Identifier that belongs to a class T (or derived) to a SubclassIdentifier<T>.
    518         If you assign something else, the program aborts.
    519         Because we know the minimum type, a dynamic_cast is done, which makes it easier to create a new object.
    520     */
    521     template <class T>
    522     class SubclassIdentifier
    523     {
    524         public:
    525             /**
    526                 @brief Constructor: Automaticaly assigns the Identifier of the given class.
    527             */
    528             SubclassIdentifier()
    529             {
    530                 this->identifier_ = ClassIdentifier<T>::getIdentifier();
    531             }
    532 
    533             /**
    534                 @brief Copyconstructor: Assigns the given Identifier.
    535                 @param identifier The Identifier
    536             */
    537             SubclassIdentifier(Identifier* identifier)
    538             {
    539                 this->operator=(identifier);
    540             }
    541 
    542             /**
    543                 @brief Overloading of the = operator: assigns the identifier and checks its type.
    544                 @param identifier The Identifier to assign
    545                 @return The SubclassIdentifier itself
    546             */
    547             SubclassIdentifier<T>& operator=(Identifier* identifier)
    548             {
    549                 if (!identifier || !identifier->isA(ClassIdentifier<T>::getIdentifier()))
    550                 {
    551                     COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
    552                     if (identifier)
    553                     {
    554                         COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
    555                         COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
    556                     }
    557                     else
    558                     {
    559                         COUT(1) << "Error: Can't assign NULL identifier" << std::endl;
    560                     }
    561                 }
    562                 else
    563                 {
    564                     this->identifier_ = identifier;
    565                 }
    566                 return *this;
    567             }
    568 
    569             /**
    570                 @brief Overloading of the * operator: returns the assigned identifier.
    571             */
    572             inline Identifier* operator*() const
    573             {
    574                 return this->identifier_;
    575             }
    576 
    577             /**
    578                 @brief Overloading of the -> operator: returns the assigned identifier.
    579             */
    580             inline Identifier* operator->() const
    581             {
    582                 return this->identifier_;
    583             }
    584 
    585             /**
    586                 @brief Returns the assigned identifier. This allows you to assign a SubclassIdentifier to a normal Identifier*.
    587             */
    588             inline operator Identifier*() const
    589             {
    590                 return this->identifier_;
    591             }
    592 
    593             /**
    594                 @brief Creates a new object of the type of the assigned Identifier and dynamic_casts it to the minimal type given by T.
    595                 @return The new object
    596             */
    597             T* fabricate(BaseObject* creator) const
    598             {
    599                 BaseObject* newObject = this->identifier_->fabricate(creator);
    600 
    601                 // Check if the creation was successful
    602                 if (newObject)
    603                 {
    604                     return orxonox_cast<T*>(newObject);
    605                 }
    606                 else
    607                 {
    608                     // Something went terribly wrong
    609                     if (this->identifier_)
    610                     {
    611                         COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
    612                         COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
    613                         COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
    614                         COUT(1) << "Aborting..." << std::endl;
    615                     }
    616                     else
    617                     {
    618                         COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl;
    619                         COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl;
    620                         COUT(1) << "Aborting..." << std::endl;
    621                     }
    622 
    623                     assert(false);
    624                     return 0;
    625                 }
    626             }
    627 
    628             /** @brief Returns the assigned identifier. @return The identifier */
    629             inline Identifier* getIdentifier() const
    630                 { return this->identifier_; }
    631 
    632 //            /** @brief Returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
    633 //            inline bool isA(const Identifier* identifier) const
    634 //                { return this->identifier_->isA(identifier); }
    635 //
    636 //            /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
    637 //            inline bool isExactlyA(const Identifier* identifier) const
    638 //                { return this->identifier_->isExactlyA(identifier); }
    639 //
    640 //            /** @brief Returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
    641 //            inline bool isChildOf(const Identifier* identifier) const
    642 //                { return this->identifier_->isChildOf(identifier); }
    643 //
    644 //            /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */
    645 //            inline bool isDirectChildOf(const Identifier* identifier) const
    646 //                { return this->identifier_->isDirectChildOf(identifier); }
    647 //
    648 //            /** @brief Returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
    649 //            inline bool isParentOf(const Identifier* identifier) const
    650 //                { return this->identifier_->isParentOf(identifier); }
    651 //
    652 //            /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */
    653 //            inline bool isDirectParentOf(const Identifier* identifier) const
    654 //                { return this->identifier_->isDirectParentOf(identifier); }
    655 
    656         private:
    657             Identifier* identifier_;            //!< The assigned identifier
    658     };
    659514}
    660515
Note: See TracChangeset for help on using the changeset viewer.