Changeset 806 for code/branches/core/src/orxonox/core/Identifier.h
- Timestamp:
- Feb 12, 2008, 4:43:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/core/Identifier.h
r805 r806 106 106 bool isParentOf(const Identifier* identifier) const; 107 107 108 // static std::map<std::string, Identifier*>& getIdentifierMap();109 110 108 /** @brief Removes all objects of the corresponding class. */ 111 109 virtual void removeObjects() const = 0; … … 192 190 ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass); 193 191 void addObject(T* object); 194 // static ClassIdentifier<T>* getIdentifier();195 192 void removeObjects() const; 196 193 void setName(const std::string& name); … … 244 241 245 242 /** 246 @brief Creates the only instance of this class for the template class T.247 @return The Identifier itself248 *//*249 template <class T>250 ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()251 {252 static ClassIdentifier<T> theOneAndOnlyInstance = ClassIdentifier<T>();253 static bool bIdentifierCreated = false;254 255 if (!bIdentifierCreated)256 {257 COUT(4) << "*** Create Identifier Singleton." << std::endl;258 bIdentifierCreated = true;259 }260 261 return &theOneAndOnlyInstance;262 }263 */264 /**265 243 @brief Sets the name of the class. 266 244 @param name The name … … 269 247 void ClassIdentifier<T>::setName(const std::string& name) 270 248 { 271 // // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map272 249 if (!this->bSetName_) 273 250 { 274 251 this->name_ = name; 275 // this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));276 252 this->bSetName_ = true; 277 253 }
Note: See TracChangeset
for help on using the changeset viewer.