Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/src/network/NetworkCallback.h @ 1529

Last change on this file since 1529 was 1529, checked in by scheusso, 16 years ago

missed to add a file

File size: 508 bytes
Line 
1#ifndef _NETWORK_CALLBACK__
2#define _NETWORK_CALLBACK__
3
4namespace network{
5  class NetworkCallbackBase
6  {
7    public:
8      virtual void call() = 0;
9  };
10 
11  template <class T>
12  class NetworkCallback: public NetworkCallbackBase
13  {
14    public:
15      NetworkCallback(T* object, void (T::*function) (void)) : object_(object), function_(function) {}
16      virtual void call()
17        { (this->object_->*function_)(); }
18 
19    private:
20      T* object_;
21      void (T::*function_) (void);
22  }; 
23
24
25}
26
27
28#endif
Note: See TracBrowser for help on using the repository browser.