Changeset 2309 for code/branches/network64/src/core
- Timestamp:
- Dec 2, 2008, 9:10:00 PM (16 years ago)
- Location:
- code/branches/network64/src/core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network64/src/core/CoreIncludes.h
r2171 r2309 48 48 #include "Functor.h" 49 49 #include "util/Debug.h" 50 #include "util/Integers.h" 50 51 51 52 -
code/branches/network64/src/core/Factory.cc
r2171 r2309 58 58 @return The Identifier 59 59 */ 60 Identifier* Factory::getIdentifier(const u nsigned int id)60 Identifier* Factory::getIdentifier(const uint32_t id) 61 61 { 62 std::map<u nsigned int, Identifier*>::const_iterator it = getFactoryPointer()->identifierNetworkIDMap_.find(id);62 std::map<uint32_t, Identifier*>::const_iterator it = getFactoryPointer()->identifierNetworkIDMap_.find(id); 63 63 if (it != getFactoryPointer()->identifierNetworkIDMap_.end()) 64 64 return it->second; … … 85 85 @param newID The new networkID 86 86 */ 87 void Factory::changeNetworkID(Identifier* identifier, const u nsigned int oldID, const unsigned int newID)87 void Factory::changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID) 88 88 { 89 89 getFactoryPointer()->identifierNetworkIDMap_.erase(oldID); -
code/branches/network64/src/core/Factory.h
r2171 r2309 49 49 #include <map> 50 50 #include <string> 51 #include "util/Integers.h" 51 52 52 53 namespace orxonox … … 60 61 public: 61 62 static Identifier* getIdentifier(const std::string& name); 62 static Identifier* getIdentifier(const u nsigned int id);63 static Identifier* getIdentifier(const uint32_t id); 63 64 static void add(const std::string& name, Identifier* identifier); 64 static void changeNetworkID(Identifier* identifier, const u nsigned int oldID, const unsigned int newID);65 static void changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID); 65 66 static void createClassHierarchy(); 66 67 … … 83 84 84 85 std::map<std::string, Identifier*> identifierStringMap_; //!< The map, mapping the name with the Identifier 85 std::map<u nsigned int, Identifier*> identifierNetworkIDMap_; //!< The map, mapping the network ID with the Identifier86 std::map<uint32_t, Identifier*> identifierNetworkIDMap_; //!< The map, mapping the network ID with the Identifier 86 87 }; 87 88 -
code/branches/network64/src/core/Identifier.cc
r2171 r2309 235 235 @param id The new network ID 236 236 */ 237 void Identifier::setNetworkID(u nsigned int id)237 void Identifier::setNetworkID(uint32_t id) 238 238 { 239 239 Factory::changeNetworkID(this, this->classID_, id); -
code/branches/network64/src/core/Identifier.h
r2171 r2309 230 230 231 231 /** @brief Returns the network ID to identify a class through the network. @return the network ID */ 232 inline const u nsigned int getNetworkID() const { return this->classID_; }232 inline const uint32_t getNetworkID() const { return this->classID_; } 233 233 234 234 /** @brief Sets the network ID to a new value. @param id The new value */ 235 void setNetworkID(u nsigned int id);235 void setNetworkID(uint32_t id); 236 236 237 237 void addConfigValueContainer(const std::string& varname, ConfigValueContainer* container); … … 315 315 BaseFactory* factory_; //!< The Factory, able to create new objects of the given class (if available) 316 316 static 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) 317 u nsigned int classID_;//!< The network ID to identify a class through the network317 uint32_t classID_; //!< The network ID to identify a class through the network 318 318 319 319 bool bHasConfigValues_; //!< True if this class has at least one assigned config value
Note: See TracChangeset
for help on using the changeset viewer.