Changeset 6192 for code/branches/presentation2/src/libraries/network/synchronisable/NetworkCallback.h
- Timestamp:
- Dec 2, 2009, 11:35:24 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/network/synchronisable/NetworkCallback.h
r6073 r6192 33 33 #include "network/NetworkPrereqs.h" 34 34 #include "NetworkCallbackManager.h" 35 // #include "util/MultiType.h" 35 36 36 37 namespace orxonox{ 38 39 struct EmptyType{}; 37 40 38 41 class _NetworkExport NetworkCallbackBase … … 57 60 void (T::*function_) (void); 58 61 }; 62 63 template <class T, class U> 64 class NetworkCallbackNotify: public NetworkCallbackBase 65 { 66 public: 67 NetworkCallbackNotify(T* object, void (T::*function) (const U&)) : object_(object), function_(function) {} 68 NetworkCallbackNotify() {} 69 virtual ~NetworkCallbackNotify() {} 70 virtual void call() 71 { (this->object_->*function_)( this->oldValue_ ); } 72 void setOldValue(const U& value){ this->oldValue_ = value; } 73 private: 74 T* object_; 75 U oldValue_; 76 void (T::*function_) (const U&); 77 }; 59 78 60 79 }
Note: See TracChangeset
for help on using the changeset viewer.