MAK Data Logger API Documentation for DIS
lgrCommandFunctor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
10 
11 #ifndef lgrCommandFunctor_H_
12 #define lgrCommandFunctor_H_
13 
14 #include <vlutil/vlSmartPointers.h>
15 
16 namespace MAKLogger
17 {
18 
23  {
24  public:
26  virtual ~DtCommandFunctor() {}
28  virtual DtResponse operator()(const DtCommand& command) = 0;
29  };
30 
35  {
36  public:
38  virtual ~DtResponseFunctor(){}
40  virtual void operator()(DtResponse command) = 0;
41  };
42 
43 
45  typedef DtBoost::shared_ptr<DtCommandFunctor> DtCommandFunctorSP;
46  typedef DtBoost::shared_ptr<DtResponseFunctor> DtResponseFunctorSP;
47 
48 
51 
52  template <typename T>
54  {
55  public:
57  typedef DtResponse (T::*ProcCmdFunction)(const DtCommand& command);
58 
73  DtLgrCommandHandlerFunctor(T* object,ProcCmdFunction function);
74 
77 
80  virtual DtResponse operator()(const DtCommand& command);
81 
82  protected:
87  };
88 
91 
92  template <typename T>
94  {
95  public:
97  typedef void (T::*ProcCmdFunction)(DtResponse command);
98 
113  DtCommandInterfaceFunctor(T* object,ProcCmdFunction function);
114 
115 
117  virtual ~DtCommandInterfaceFunctor();
118 
121  virtual void operator()(DtResponse command);
122 
123  protected:
128  };
129 
132  template <typename T>
133  DtCommandFunctorSP createHandler(T* const object,
135 
138  template <typename T>
139  DtResponseFunctorSP createHandler(T* const object,
141 
142 #define lgrCommandFunctor_inl_
143 #include "lgrCommandFunctor.inl"
144 #undef lgrCommandFunctor_inl_
145 
146 }
147 
148 #endif
149 

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)