Changeset 7198 for code/branches/consolecommands3/src/libraries/network
- Timestamp:
- Aug 21, 2010, 9:52:13 PM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/network/NetworkFunction.cc
r6417 r7198 68 68 69 69 70 NetworkFunctionStatic::NetworkFunctionStatic( FunctorStatic*functor, const std::string& name, const NetworkFunctionPointer& p):70 NetworkFunctionStatic::NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p): 71 71 NetworkFunctionBase(name) 72 72 { … … 76 76 NetworkFunctionStatic::getFunctorMap()[p] = this; 77 77 NetworkFunctionStatic::getIdMap()[ this->getNetworkID() ] = this; 78 }79 80 NetworkFunctionStatic::~NetworkFunctionStatic()81 {82 delete this->functor_;83 78 } 84 79 -
code/branches/consolecommands3/src/libraries/network/NetworkFunction.h
r6417 r7198 102 102 class _NetworkExport NetworkFunctionStatic: public NetworkFunctionBase { 103 103 public: 104 NetworkFunctionStatic(FunctorStatic* functor, const std::string& name, const NetworkFunctionPointer& p); 105 ~NetworkFunctionStatic(); 104 NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p); 106 105 107 106 inline void call(){ (*this->functor_)(); } … … 124 123 static std::map<NetworkFunctionPointer, NetworkFunctionStatic*>& getFunctorMap(); 125 124 static std::map<uint32_t, NetworkFunctionStatic*>& getIdMap(); 126 FunctorStatic *functor_;125 FunctorStaticPtr functor_; 127 126 128 127 }; … … 155 154 template <class T> class NetworkMemberFunction: public NetworkMemberFunctionBase { 156 155 public: 157 NetworkMemberFunction(FunctorMember<T>* functor, const std::string& name, const NetworkFunctionPointer& p); 158 ~NetworkMemberFunction(); 156 NetworkMemberFunction(const FunctorMemberPtr<T>& functor, const std::string& name, const NetworkFunctionPointer& p); 159 157 160 158 inline void call(uint32_t objectID) … … 190 188 191 189 private: 192 FunctorMember <T>*functor_;193 }; 194 195 template <class T> NetworkMemberFunction<T>::NetworkMemberFunction( FunctorMember<T>*functor, const std::string& name, const NetworkFunctionPointer& p):190 FunctorMemberPtr<T> functor_; 191 }; 192 193 template <class T> NetworkMemberFunction<T>::NetworkMemberFunction(const FunctorMemberPtr<T>& functor, const std::string& name, const NetworkFunctionPointer& p): 196 194 NetworkMemberFunctionBase(name, p), functor_(functor) 197 195 { 198 }199 template <class T> NetworkMemberFunction<T>::~NetworkMemberFunction()200 {201 delete this->functor_;202 196 } 203 197
Note: See TracChangeset
for help on using the changeset viewer.