Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 2:41:57 PM (9 years ago)
Author:
landauf
Message:

refactored the interface of NetworkFunctionManager: maps are better encapsulated now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/network/packet/FunctionIDs.cc

    r10474 r10475  
    5656
    5757  //calculate total needed size (for all strings and integers)
    58   std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionManager::getInstance().getNameMap();
    59   std::map<std::string, NetworkFunctionBase*>::iterator it;
    60   for (it = map.begin(); it != map.end(); ++it)
     58  const std::set<NetworkFunctionBase*>& set = NetworkFunctionManager::getInstance().getAllFunctions();
     59  std::set<NetworkFunctionBase*>::const_iterator it;
     60  for (it = set.begin(); it != set.end(); ++it)
    6161  {
    62     const std::string& functionname = it->second->getName();
    63     networkID = it->second->getNetworkID();
     62    const std::string& functionname = (*it)->getName();
     63    networkID = (*it)->getNetworkID();
    6464    // now push the network id and the classname to the stack
    6565    tempQueue.push( std::pair<unsigned int, std::string>(networkID, functionname) );
     
    140140    functionname = temp+2*sizeof(uint32_t);
    141141    orxout(internal_info, context::packets) << "processing functionid: " << networkID << " name: " << functionname << endl;
    142     NetworkFunctionManager::getInstance().setNetworkID((const char*)functionname, networkID);
     142    NetworkFunctionManager::getInstance().getFunctionByName((const char*)functionname)->setNetworkID(networkID);
    143143    temp += 2*sizeof(uint32_t) + stringsize;
    144144  }
Note: See TracChangeset for help on using the changeset viewer.