- Timestamp:
- May 25, 2015, 1:37:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/network/NetworkFunctionManager.cc
r10469 r10471 32 32 namespace orxonox 33 33 { 34 std::map<NetworkFunctionPointer, NetworkFunctionBase*> NetworkFunctionManager::functorMap_; 35 std::map<uint32_t, NetworkFunctionBase*> NetworkFunctionManager::idMap_; 36 34 37 /* static */NetworkFunctionManager& NetworkFunctionManager::getInstance() 35 38 { … … 58 61 return nameMap_; 59 62 } 63 64 /*static*/NetworkFunctionBase* NetworkFunctionManager::getFunction(const NetworkFunctionPointer& p) 65 { 66 std::map<NetworkFunctionPointer, NetworkFunctionBase*>::iterator it = functorMap_.find(p); 67 assert(it != functorMap_.end()); 68 return it->second; 69 } 70 71 /*static*/NetworkFunctionBase* NetworkFunctionManager::getFunction(uint32_t id) 72 { 73 std::map<uint32_t, NetworkFunctionBase*>::iterator it = idMap_.find(id); 74 assert(it != idMap_.end()); 75 return it->second; 76 } 60 77 }
Note: See TracChangeset
for help on using the changeset viewer.