Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 12:13:27 PM (9 years ago)
Author:
landauf
Message:

moved static content of NetworkFunctionBase to NetworkFunctionManager

File:
1 edited

Legend:

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

    r10362 r10468  
    2828
    2929#include "NetworkFunction.h"
     30#include "NetworkFunctionManager.h"
    3031#include "core/CoreIncludes.h"
    3132
    3233namespace orxonox
    3334{
    34   std::map<uint32_t, bool> NetworkFunctionBase::isStaticMap_;
    35 
    3635  std::map<NetworkFunctionPointer, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::functorMap_;
    3736  std::map<uint32_t, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::idMap_;
     
    5049
    5150    this->name_ = name;
    52     NetworkFunctionBase::getNameMap()[name] = this;
     51    NetworkFunctionManager::getNameMap()[name] = this;
    5352  }
    5453  NetworkFunctionBase::~NetworkFunctionBase()
    5554  {
    56   }
    57 
    58 
    59   void NetworkFunctionBase::destroyAllNetworkFunctions()
    60   {
    61     std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionBase::getNameMap();
    62     std::map<std::string, NetworkFunctionBase*>::iterator it;
    63     for( it=map.begin(); it!=map.end(); ++it )
    64       delete it->second;
    65   }
    66 
    67 
    68   /*static*/ std::map<std::string, NetworkFunctionBase*>& NetworkFunctionBase::getNameMap()
    69   {
    70     static std::map<std::string, NetworkFunctionBase*> nameMap_;
    71     return nameMap_;
    7255  }
    7356
Note: See TracChangeset for help on using the changeset viewer.