Changeset 10565 for code/branches/core7/src/libraries/network
- Timestamp:
- Aug 30, 2015, 2:36:27 PM (9 years ago)
- Location:
- code/branches/core7/src/libraries/network
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/network/FunctionCall.cc
r10478 r10565 47 47 48 48 bool FunctionCall::execute(){ 49 NetworkFunctionBase* fct = static_cast<NetworkFunctionStatic*>(NetworkFunctionManager::getInstance().getFunctionByNetworkId( this->functionID_ )); 49 NetworkFunctionBase* fct = NetworkFunctionManager::getInstance().getFunctionByNetworkId( this->functionID_ ); 50 assert( fct != NULL ); 50 51 assert( this->nrOfArguments_==this->arguments_.size() ); 51 52 switch(this->nrOfArguments_) -
code/branches/core7/src/libraries/network/NetworkFunction.cc
r10476 r10565 42 42 void NetworkFunctionBase::setNetworkID(uint32_t id) 43 43 { 44 NetworkFunctionManager::getInstance().unregisterFunction(this); // unregister with old id45 44 this->networkID_ = id; 46 45 NetworkFunctionManager::getInstance().registerFunction(this); // register with new id -
code/branches/core7/src/libraries/network/NetworkFunctionManager.cc
r10542 r10565 68 68 std::map<uint32_t, NetworkFunctionBase*>::iterator it = idMap_.find(id); 69 69 assert(it != idMap_.end()); 70 return it->second; 70 if(it != idMap_.end()) 71 return it->second; 72 else 73 return NULL; 74 } 75 76 /** 77 @brief Cleans the NetworkID map (needed on clients for correct initialization) 78 */ 79 void NetworkFunctionManager::clearNetworkIDs() 80 { 81 this->idMap_.clear(); 71 82 } 72 83 } -
code/branches/core7/src/libraries/network/NetworkFunctionManager.h
r10542 r10565 56 56 NetworkFunctionBase* getFunctionByNetworkId(uint32_t id); 57 57 58 void clearNetworkIDs(); 59 58 60 private: 59 61 std::set<NetworkFunctionBase*> functions_; -
code/branches/core7/src/libraries/network/packet/FunctionIDs.cc
r10475 r10565 128 128 unsigned char *functionname; 129 129 130 //clear the map of network ids 131 NetworkFunctionManager::getInstance().clearNetworkIDs(); 132 130 133 orxout(verbose, context::packets) << "=== processing functionids: " << endl; 131 134 std::pair<uint32_t, std::string> tempPair;
Note: See TracChangeset
for help on using the changeset viewer.