- Timestamp:
- Dec 21, 2009, 1:18:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/network/NetworkFunction.cc
r6160 r6387 33 33 { 34 34 std::map<uint32_t, bool> NetworkFunctionBase::isStaticMap_; 35 35 36 36 std::map<NetworkFunctionPointer, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::functorMap_; 37 37 std::map<uint32_t, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::idMap_; … … 40 40 { 41 41 RegisterRootObject(NetworkFunctionBase); 42 42 43 43 static uint32_t networkID = 0; 44 44 this->networkID_ = networkID++; 45 45 46 46 this->name_ = name; 47 47 NetworkFunctionBase::getNameMap()[name] = this; … … 50 50 { 51 51 } 52 53 52 53 54 54 void NetworkFunctionBase::destroyAllNetworkFunctions() 55 55 { … … 59 59 it->second->destroy(); 60 60 } 61 62 61 62 63 63 /*static*/ std::map<std::string, NetworkFunctionBase*>& NetworkFunctionBase::getNameMap() 64 64 { … … 66 66 return nameMap_; 67 67 } 68 69 68 69 70 70 NetworkFunctionStatic::NetworkFunctionStatic(FunctorStatic* functor, const std::string& name, const NetworkFunctionPointer& p): 71 71 NetworkFunctionBase(name) 72 72 { 73 73 RegisterObject(NetworkFunctionStatic); 74 74 75 75 this->functor_ = functor; 76 76 NetworkFunctionStatic::getFunctorMap()[p] = this; 77 77 NetworkFunctionStatic::getIdMap()[ this->getNetworkID() ] = this; 78 78 } 79 79 80 80 NetworkFunctionStatic::~NetworkFunctionStatic() 81 81 { 82 82 delete this->functor_; 83 83 } 84 84 85 85 /*static*/ std::map<NetworkFunctionPointer, NetworkFunctionStatic*>& NetworkFunctionStatic::getFunctorMap() 86 86 { … … 88 88 return functorMap_; 89 89 } 90 90 91 91 /*static*/ std::map<uint32_t, NetworkFunctionStatic*>& NetworkFunctionStatic::getIdMap() 92 92 { … … 94 94 return idMap_; 95 95 } 96 97 96 97 98 98 NetworkMemberFunctionBase::NetworkMemberFunctionBase(const std::string& name, const NetworkFunctionPointer& p): 99 99 NetworkFunctionBase(name) 100 100 { 101 101 RegisterObject(NetworkMemberFunctionBase); 102 102 103 103 this->functorMap_[p] = this; 104 104 this->idMap_[ this->getNetworkID() ] = this; 105 105 } 106 106 107 107 NetworkMemberFunctionBase::~NetworkMemberFunctionBase() 108 108 { 109 109 } 110 110 111 111 112 112 }
Note: See TracChangeset
for help on using the changeset viewer.