Changeset 1634 for code/branches/gcc43/src/core/Identifier.h
- Timestamp:
- Jun 29, 2008, 7:36:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gcc43/src/core/Identifier.h
r1581 r1634 100 100 public: 101 101 /** @brief Sets the Factory. @param factory The factory to assign */ 102 inlinevoid addFactory(BaseFactory* factory) { this->factory_ = factory; }102 void addFactory(BaseFactory* factory) { this->factory_ = factory; } 103 103 104 104 BaseObject* fabricate(); … … 115 115 116 116 /** @brief Returns the name of the class the Identifier belongs to. @return The name */ 117 inlineconst std::string& getName() const { return this->name_; }117 const std::string& getName() const { return this->name_; } 118 118 119 119 120 120 /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */ 121 inlineconst std::set<const Identifier*>& getParents() const { return this->parents_; }121 const std::set<const Identifier*>& getParents() const { return this->parents_; } 122 122 /** @brief Returns the begin-iterator of the parents-list. @return The begin-iterator */ 123 inlinestd::set<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); }123 std::set<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); } 124 124 /** @brief Returns the end-iterator of the parents-list. @return The end-iterator */ 125 inlinestd::set<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); }125 std::set<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); } 126 126 127 127 /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */ 128 inlineconst std::set<const Identifier*>& getChildren() const { return (*this->children_); }128 const std::set<const Identifier*>& getChildren() const { return (*this->children_); } 129 129 /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */ 130 inlinestd::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); }130 std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); } 131 131 /** @brief Returns the end-iterator of the children-list. @return The end-iterator */ 132 inlinestd::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); }132 std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); } 133 133 134 134 /** @brief Returns the direct parents of the class the Identifier belongs to. @return The list of all direct parents */ 135 inlineconst std::set<const Identifier*>& getDirectParents() const { return this->directParents_; }135 const std::set<const Identifier*>& getDirectParents() const { return this->directParents_; } 136 136 /** @brief Returns the begin-iterator of the direct-parents-list. @return The begin-iterator */ 137 inlinestd::set<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); }137 std::set<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); } 138 138 /** @brief Returns the end-iterator of the direct-parents-list. @return The end-iterator */ 139 inlinestd::set<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); }139 std::set<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); } 140 140 141 141 /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */ 142 inlineconst std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }142 const std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); } 143 143 /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */ 144 inlinestd::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); }144 std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); } 145 145 /** @brief Returns the end-iterator of the direct-children-list. @return The end-iterator */ 146 inlinestd::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }146 std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); } 147 147 148 148 149 149 /** @brief Returns the map that stores all Identifiers. @return The map */ 150 static inlineconst std::map<std::string, Identifier*>& getIdentifierMap() { return Identifier::getIdentifierMapIntern(); }150 static const std::map<std::string, Identifier*>& getIdentifierMap() { return Identifier::getIdentifierMapIntern(); } 151 151 /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers. @return The const_iterator */ 152 static inlinestd::map<std::string, Identifier*>::const_iterator getIdentifierMapBegin() { return Identifier::getIdentifierMap().begin(); }152 static std::map<std::string, Identifier*>::const_iterator getIdentifierMapBegin() { return Identifier::getIdentifierMap().begin(); } 153 153 /** @brief Returns a const_iterator to the end of the map that stores all Identifiers. @return The const_iterator */ 154 static inlinestd::map<std::string, Identifier*>::const_iterator getIdentifierMapEnd() { return Identifier::getIdentifierMap().end(); }154 static std::map<std::string, Identifier*>::const_iterator getIdentifierMapEnd() { return Identifier::getIdentifierMap().end(); } 155 155 156 156 /** @brief Returns the map that stores all Identifiers with their names in lowercase. @return The map */ 157 static inlineconst std::map<std::string, Identifier*>& getLowercaseIdentifierMap() { return Identifier::getLowercaseIdentifierMapIntern(); }157 static const std::map<std::string, Identifier*>& getLowercaseIdentifierMap() { return Identifier::getLowercaseIdentifierMapIntern(); } 158 158 /** @brief Returns a const_iterator to the beginning of the map that stores all Identifiers with their names in lowercase. @return The const_iterator */ 159 static inlinestd::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapBegin() { return Identifier::getLowercaseIdentifierMap().begin(); }159 static std::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapBegin() { return Identifier::getLowercaseIdentifierMap().begin(); } 160 160 /** @brief Returns a const_iterator to the end of the map that stores all Identifiers with their names in lowercase. @return The const_iterator */ 161 static inlinestd::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapEnd() { return Identifier::getLowercaseIdentifierMap().end(); }161 static std::map<std::string, Identifier*>::const_iterator getLowercaseIdentifierMapEnd() { return Identifier::getLowercaseIdentifierMap().end(); } 162 162 163 163 164 164 /** @brief Returns the map that stores all config values. @return The const_iterator */ 165 inlineconst std::map<std::string, ConfigValueContainer*>& getConfigValueMap() const { return this->configValues_; }165 const std::map<std::string, ConfigValueContainer*>& getConfigValueMap() const { return this->configValues_; } 166 166 /** @brief Returns a const_iterator to the beginning of the map that stores all config values. @return The const_iterator */ 167 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapBegin() const { return this->configValues_.begin(); }167 std::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapBegin() const { return this->configValues_.begin(); } 168 168 /** @brief Returns a const_iterator to the end of the map that stores all config values. @return The const_iterator */ 169 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapEnd() const { return this->configValues_.end(); }169 std::map<std::string, ConfigValueContainer*>::const_iterator getConfigValueMapEnd() const { return this->configValues_.end(); } 170 170 171 171 /** @brief Returns the map that stores all config values with their names in lowercase. @return The const_iterator */ 172 inlineconst std::map<std::string, ConfigValueContainer*>& getLowercaseConfigValueMap() const { return this->configValues_LC_; }172 const std::map<std::string, ConfigValueContainer*>& getLowercaseConfigValueMap() const { return this->configValues_LC_; } 173 173 /** @brief Returns a const_iterator to the beginning of the map that stores all config values with their names in lowercase. @return The const_iterator */ 174 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapBegin() const { return this->configValues_LC_.begin(); }174 std::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapBegin() const { return this->configValues_LC_.begin(); } 175 175 /** @brief Returns a const_iterator to the end of the map that stores all config values with their names in lowercase. @return The const_iterator */ 176 inlinestd::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapEnd() const { return this->configValues_LC_.end(); }176 std::map<std::string, ConfigValueContainer*>::const_iterator getLowercaseConfigValueMapEnd() const { return this->configValues_LC_.end(); } 177 177 178 178 179 179 /** @brief Returns the map that stores all console commands. @return The const_iterator */ 180 inlineconst std::map<std::string, ConsoleCommand*>& getConsoleCommandMap() const { return this->consoleCommands_; }180 const std::map<std::string, ConsoleCommand*>& getConsoleCommandMap() const { return this->consoleCommands_; } 181 181 /** @brief Returns a const_iterator to the beginning of the map that stores all console commands. @return The const_iterator */ 182 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); }182 std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); } 183 183 /** @brief Returns a const_iterator to the end of the map that stores all console commands. @return The const_iterator */ 184 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); }184 std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); } 185 185 186 186 /** @brief Returns the map that stores all console commands with their names in lowercase. @return The const_iterator */ 187 inlineconst std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; }187 const std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; } 188 188 /** @brief Returns a const_iterator to the beginning of the map that stores all console commands with their names in lowercase. @return The const_iterator */ 189 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); }189 std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); } 190 190 /** @brief Returns a const_iterator to the end of the map that stores all console commands with their names in lowercase. @return The const_iterator */ 191 inlinestd::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }191 std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); } 192 192 193 193 194 194 /** @brief Returns true if this class has at least one config value. @return True if this class has at least one config value */ 195 inlinebool hasConfigValues() const { return this->bHasConfigValues_; }195 bool hasConfigValues() const { return this->bHasConfigValues_; } 196 196 /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */ 197 inlinebool hasConsoleCommands() const { return this->bHasConsoleCommands_; }197 bool hasConsoleCommands() const { return this->bHasConsoleCommands_; } 198 198 199 199 /** @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 */ 200 inlinestatic bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }200 static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); } 201 201 202 202 /** @brief Returns the network ID to identify a class through the network. @return the network ID */ 203 inlineconst unsigned int getNetworkID() const { return this->classID_; }203 const unsigned int getNetworkID() const { return this->classID_; } 204 204 205 205 /** @brief Sets the network ID to a new value. @param id The new value */ … … 233 233 234 234 /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */ 235 inlinestd::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); }235 std::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); } 236 236 /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */ 237 inlinestd::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }237 std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); } 238 238 239 239 /** 240 240 @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents. 241 241 */ 242 inlinestatic void startCreatingHierarchy()242 static void startCreatingHierarchy() 243 243 { 244 244 hierarchyCreatingCounter_s++; … … 249 249 @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents. 250 250 */ 251 inlinestatic void stopCreatingHierarchy()251 static void stopCreatingHierarchy() 252 252 { 253 253 hierarchyCreatingCounter_s--; … … 302 302 void setName(const std::string& name); 303 303 /** @brief Returns the list of all existing objects of this class. @return The list */ 304 inlineObjectList<T>* getObjects() const { return this->objects_; }304 ObjectList<T>* getObjects() const { return this->objects_; } 305 305 /** @brief Returns a list of all existing objects of this class. @return The list */ 306 inlineObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; }306 ObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; } 307 307 308 308 void updateConfigValues() const; … … 586 586 587 587 /** @brief Returns the assigned identifier. @return The identifier */ 588 inlineconst Identifier* getIdentifier() const588 const Identifier* getIdentifier() const 589 589 { return this->identifier_; } 590 590 591 591 /** @brief Returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */ 592 inlinebool isA(const Identifier* identifier) const592 bool isA(const Identifier* identifier) const 593 593 { return this->identifier_->isA(identifier); } 594 594 595 595 /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */ 596 inlinebool isExactlyA(const Identifier* identifier) const596 bool isExactlyA(const Identifier* identifier) const 597 597 { return this->identifier_->isExactlyA(identifier); } 598 598 599 599 /** @brief Returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */ 600 inlinebool isChildOf(const Identifier* identifier) const600 bool isChildOf(const Identifier* identifier) const 601 601 { return this->identifier_->isChildOf(identifier); } 602 602 603 603 /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */ 604 inlinebool isDirectChildOf(const Identifier* identifier) const604 bool isDirectChildOf(const Identifier* identifier) const 605 605 { return this->identifier_->isDirectChildOf(identifier); } 606 606 607 607 /** @brief Returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */ 608 inlinebool isParentOf(const Identifier* identifier) const608 bool isParentOf(const Identifier* identifier) const 609 609 { return this->identifier_->isParentOf(identifier); } 610 610 611 611 /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */ 612 inlinebool isDirectParentOf(const Identifier* identifier) const612 bool isDirectParentOf(const Identifier* identifier) const 613 613 { return this->identifier_->isDirectParentOf(identifier); } 614 614
Note: See TracChangeset
for help on using the changeset viewer.