Changeset 7284 for code/trunk/src/libraries/network/NetworkFunction.h
- Timestamp:
- Aug 31, 2010, 3:37:40 AM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/network/NetworkFunction.h
r6417 r7284 39 39 #include <boost/static_assert.hpp> 40 40 41 #include "core/Functor.h"42 41 #include "core/Identifier.h" 42 #include "core/command/Functor.h" 43 43 #include "FunctionCallManager.h" 44 44 #include "synchronisable/Synchronisable.h" … … 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.