Changeset 10481 for code/branches/core7/src
- Timestamp:
- May 25, 2015, 9:40:11 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/CoreIncludes.h
r10404 r10481 167 167 inline Identifier* registerClass(const std::string& name, Factory* factory, bool bLoadable = true) 168 168 { 169 Identifier* identifier = new ClassIdentifier<T>(name, factory, bLoadable); 170 IdentifierManager::getInstance().addIdentifier(identifier); 171 return identifier; 169 return new ClassIdentifier<T>(name, factory, bLoadable); 172 170 } 173 171 … … 242 240 virtual void load() 243 241 { 242 IdentifierManager::getInstance().addIdentifier(this->identifier_); 244 243 for (size_t i = 0; i < this->parents_.size(); ++i) 245 244 this->identifier_->inheritsFrom(this->parents_[i]->getParent()); … … 248 247 virtual void unload() 249 248 { 249 IdentifierManager::getInstance().removeIdentifier(this->identifier_); 250 250 } 251 251 -
code/branches/core7/src/libraries/core/class/IdentifierManager.cc
r10479 r10481 68 68 this->identifierByLowercaseString_[getLowercase(identifier->getName())] = identifier; 69 69 this->identifierByNetworkId_[identifier->getNetworkID()] = identifier; 70 } 71 72 /** 73 * Unregisters the identifier from all maps of the IdentifierManager. 74 */ 75 void IdentifierManager::removeIdentifier(Identifier* identifier) 76 { 77 this->identifiers_.erase(identifier); 78 this->identifierByString_.erase(identifier->getName()); 79 this->identifierByLowercaseString_.erase(getLowercase(identifier->getName())); 80 this->identifierByNetworkId_.erase(identifier->getNetworkID()); 70 81 } 71 82 -
code/branches/core7/src/libraries/core/class/IdentifierManager.h
r10403 r10481 50 50 51 51 void addIdentifier(Identifier* identifier); 52 void removeIdentifier(Identifier* identifier); 52 53 53 54 unsigned int getUniqueClassId() -
code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h
r10460 r10481 77 77 namespace orxonox 78 78 { 79 80 79 class _CoreExport StaticallyInitializedScopedSingletonWrapper : public StaticallyInitializedInstance 81 80 {
Note: See TracChangeset
for help on using the changeset viewer.