Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 2:14:16 PM (6 years ago)
Author:
landauf
Message:

made NetworkFunctionManager a singleton, no static functions anymore (except for getInstance)

File:
1 edited

Legend:

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

    r10471 r10474  
    3838
    3939        this->name_ = name;
    40         NetworkFunctionManager::getNameMap()[name] = this;
    41         NetworkFunctionManager::getFunctorMap()[p] = this;
    42         NetworkFunctionManager::getIdMap()[this->getNetworkID()] = this;
     40        NetworkFunctionManager::getInstance().getNameMap()[name] = this;
     41        NetworkFunctionManager::getInstance().getFunctorMap()[p] = this;
     42        NetworkFunctionManager::getInstance().getIdMap()[this->getNetworkID()] = this;
    4343    }
    4444
    4545    void NetworkFunctionBase::setNetworkID(uint32_t id)
    4646    {
    47         NetworkFunctionManager::getIdMap().erase(this->networkID_);  // remove old id
     47        NetworkFunctionManager::getInstance().getIdMap().erase(this->networkID_);  // remove old id
    4848        this->networkID_ = id;
    49         NetworkFunctionManager::getIdMap()[this->networkID_] = this; // add new id
     49        NetworkFunctionManager::getInstance().getIdMap()[this->networkID_] = this; // add new id
    5050    }
    5151}
Note: See TracChangeset for help on using the changeset viewer.