Changeset 10483
- Timestamp:
- May 25, 2015, 10:36:28 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/Core.cc
r10480 r10483 135 135 } 136 136 137 // TODO: initialize Root-Context 138 // TODO: initialize IdentifierManager here 137 139 // TODO: initialize ScopeManager here 138 140 // TODO: initialize CommandLineParser here -
code/branches/core7/src/libraries/core/class/Identifier.cc
r10482 r10483 53 53 */ 54 54 Identifier::Identifier(const std::string& name, Factory* factory, bool bLoadable) 55 : classID_(IdentifierManager::getInstance().getUniqueClassId())56 55 { 57 56 orxout(verbose, context::identifier) << "Create identifier for " << name << endl; 58 57 58 static unsigned int classIDCounter = 0; 59 60 this->classID_ = classIDCounter++; 59 61 this->name_ = name; 60 62 this->factory_ = factory; -
code/branches/core7/src/libraries/core/class/Identifier.h
r10467 r10483 231 231 Factory* factory_; //!< The Factory, able to create new objects of the given class (if available) 232 232 uint32_t networkID_; //!< The network ID to identify a class through the network 233 const unsigned int classID_;//!< Uniquely identifies a class (might not be the same as the networkID_)233 unsigned int classID_; //!< Uniquely identifies a class (might not be the same as the networkID_) 234 234 235 235 bool bHasConfigValues_; //!< True if this class has at least one assigned config value -
code/branches/core7/src/libraries/core/class/IdentifierManager.cc
r10481 r10483 53 53 { 54 54 this->hierarchyCreatingCounter_s = 0; 55 this->classIDCounter_s = 0;56 55 this->recordTraceForIdentifier_ = NULL; 57 56 } -
code/branches/core7/src/libraries/core/class/IdentifierManager.h
r10481 r10483 51 51 void addIdentifier(Identifier* identifier); 52 52 void removeIdentifier(Identifier* identifier); 53 54 unsigned int getUniqueClassId()55 { return this->classIDCounter_s++; }56 53 57 54 … … 110 107 111 108 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) 112 unsigned int classIDCounter_s; //!< counter for the unique classIDs113 109 114 110 /// Used while creating the object hierarchy to keep track of the identifiers of a newly created object (and all other objects that get created as
Note: See TracChangeset
for help on using the changeset viewer.