Changeset 9642 for code/branches/core6/src/libraries
- Timestamp:
- Aug 11, 2013, 9:39:59 PM (11 years ago)
- Location:
- code/branches/core6/src/libraries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/src/libraries/core/class/IdentifierManager.h
r9641 r9642 47 47 static IdentifierManager& getInstance(); 48 48 49 /////////////////////////////50 ////// Class Hierarchy //////51 /////////////////////////////52 49 Identifier* getIdentifierSingleton(const std::string& name, Identifier* proposal); 50 void registerIdentifier(Identifier* identifier); 53 51 54 52 unsigned int getUniqueClassId() 55 53 { return this->classIDCounter_s++; } 56 54 57 void registerIdentifier(Identifier* identifier);58 55 56 ///////////////////////////// 57 ////// Class Hierarchy ////// 58 ///////////////////////////// 59 59 void createClassHierarchy(); 60 void destroyAllIdentifiers(); 60 61 61 62 /// Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. … … 67 68 ///// Identifier Map ///// 68 69 ////////////////////////// 69 void destroyAllIdentifiers();70 71 70 Identifier* getIdentifierByString(const std::string& name); 72 71 Identifier* getIdentifierByLowercaseString(const std::string& name); … … 76 75 77 76 /// Returns the map that stores all Identifiers with their names. 78 inline const std::map<std::string, Identifier*>& get StringIdentifierMap()77 inline const std::map<std::string, Identifier*>& getIdentifierByStringMap() 79 78 { return this->identifierByString_; } 80 /// Returns a const_iterator to the beginning of the map that stores all Identifiers with their names.81 inline std::map<std::string, Identifier*>::const_iterator getStringIdentifierMapBegin()82 { return this->identifierByString_.begin(); }83 /// Returns a const_iterator to the end of the map that stores all Identifiers with their names.84 inline std::map<std::string, Identifier*>::const_iterator getStringIdentifierMapEnd()85 { return this->identifierByString_.end(); }86 87 79 /// Returns the map that stores all Identifiers with their names in lowercase. 88 inline const std::map<std::string, Identifier*>& get LowercaseStringIdentifierMap()80 inline const std::map<std::string, Identifier*>& getIdentifierByLowercaseStringMap() 89 81 { return this->identifierByLowercaseString_; } 90 /// Returns a const_iterator to the beginning of the map that stores all Identifiers with their names in lowercase.91 inline std::map<std::string, Identifier*>::const_iterator getLowercaseStringIdentifierMapBegin()92 { return this->identifierByLowercaseString_.begin(); }93 /// Returns a const_iterator to the end of the map that stores all Identifiers with their names in lowercase.94 inline std::map<std::string, Identifier*>::const_iterator getLowercaseStringIdentifierMapEnd()95 { return this->identifierByLowercaseString_.end(); }96 97 82 /// Returns the map that stores all Identifiers with their IDs. 98 inline const std::map<uint32_t, Identifier*>& getI DIdentifierMap()83 inline const std::map<uint32_t, Identifier*>& getIdentifierByNetworkIdMap() 99 84 { return this->identifierByNetworkId_; } 100 /// Returns a const_iterator to the beginning of the map that stores all Identifiers with their IDs.101 inline std::map<uint32_t, Identifier*>::const_iterator getIDIdentifierMapBegin()102 { return this->identifierByNetworkId_.begin(); }103 /// Returns a const_iterator to the end of the map that stores all Identifiers with their IDs.104 inline std::map<uint32_t, Identifier*>::const_iterator getIDIdentifierMapEnd()105 { return this->identifierByNetworkId_.end(); }106 85 107 86 private: -
code/branches/core6/src/libraries/network/packet/ClassID.cc
r9640 r9642 55 55 56 56 //calculate total needed size (for all strings and integers) 57 std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().get StringIdentifierMapBegin();58 for(;it != IdentifierManager::getInstance().get StringIdentifierMapEnd();++it){57 std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().getIdentifierByStringMap().begin(); 58 for(;it != IdentifierManager::getInstance().getIdentifierByStringMap().end();++it){ 59 59 id = it->second; 60 60 if(id == NULL || !id->hasFactory())
Note: See TracChangeset
for help on using the changeset viewer.