Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/network/NetworkCallback.h @ 1534

Last change on this file since 1534 was 1534, checked in by rgrieder, 16 years ago

merged network branch back to trunk

  • Property svn:eol-style set to native
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.