MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #pragma once
12 
13 // No export declaration as these classes are inline and templates.
14 #include <vlutil/vlSmartPointers.h>
15 
16 namespace MAKLogger
17 {
18 
23  {
24  public:
28  virtual ~DtCommandFunctor() {}
30  virtual DtResponse operator()(const DtCommand& command) = 0;
31  };
32 
37  {
38  public:
42  virtual ~DtResponseFunctor(){}
44  virtual void operator()(DtResponse command) = 0;
45  };
46 
47 
49  typedef DtBoost::shared_ptr<DtCommandFunctor> DtCommandFunctorSP;
50  typedef DtBoost::shared_ptr<DtResponseFunctor> DtResponseFunctorSP;
51 
52 
55 
56  template <typename T>
58  {
59  public:
61  typedef DtResponse (T::*ProcCmdFunction)(const DtCommand& command);
62 
77  DtLgrCommandHandlerFunctor(T* object,ProcCmdFunction function);
78 
81 
84  virtual DtResponse operator()(const DtCommand& command);
85 
86  protected:
91  };
92 
95 
96  template <typename T>
98  {
99  public:
101  typedef void (T::*ProcCmdFunction)(DtResponse command);
102 
117  DtCommandInterfaceFunctor(T* object,ProcCmdFunction function);
118 
119 
121  virtual ~DtCommandInterfaceFunctor();
122 
125  virtual void operator()(DtResponse command);
126 
127  protected:
132  };
133 
136  template <typename T>
137  DtCommandFunctorSP createHandler(T* const object,
139 
142  template <typename T>
143  DtResponseFunctorSP createHandler(T* const object,
145 
146 #define lgrCommandFunctor_inl_
147 #include "lgrCommandFunctor.inl"
148 #undef lgrCommandFunctor_inl_
149 
150 }
The logger command which contains the command type and its parameters.
Definition: lgrCommand.h:109
DtCommandInterfaceFunctor provides an implementation of the DtResponseFunctor which wraps a single me...
Definition: lgrCommandFunctor.h:97
virtual ~DtLgrCommandHandlerFunctor()
The Destructor.
Definition: lgrCommandFunctor.h:25
virtual DtResponse operator()(const DtCommand &command)=0
Abstract function call interface.
virtual void operator()(DtResponse command)=0
Abstract function call interface.
virtual void operator()(DtResponse command)
Function call operator which calls this stored object&#39;s stored member function.
Definition: lgrCommandFunctor.h:49
DtCommandFunctor provides an abstract interface for functions which takes a command and returns a res...
Definition: lgrCommandFunctor.h:22
DtCommandInterfaceFunctor(T *object, ProcCmdFunction function)
The Constructor.
Definition: lgrCommandFunctor.h:36
ProcCmdFunction myFunction
My function to call.
Definition: lgrCommandFunctor.h:90
DtBoost::shared_ptr< const DtCommand > DtResponse
Definition: lgrCommand.h:174
DtResponse(T::* ProcCmdFunction)(const DtCommand &command)
The Process Command Function signature.
Definition: lgrCommandFunctor.h:61
virtual ~DtCommandFunctor()
Virtual Destructor which does nothing.
Definition: lgrCommandFunctor.h:28
ProcCmdFunction myFunction
My function to call.
Definition: lgrCommandFunctor.h:131
T * myObject
Pointer to my object.
Definition: lgrCommandFunctor.h:129
DtBoost::shared_ptr< DtCommandFunctor > DtCommandFunctorSP
Typedefs for shared pointer to the Functors.
Definition: lgrCommandFunctor.h:49
void(T::* ProcCmdFunction)(DtResponse command)
The Process Response Function signature.
Definition: lgrCommandFunctor.h:101
DtCommandFunctorSP createHandler(T *const object, typename DtLgrCommandHandlerFunctor< T >::ProcCmdFunction function)
DtLgrCommandHandler is a utility function for creating shared pointers to DtLgrCommandHandlerFunctor&#39;...
Definition: lgrCommandFunctor.h:56
DtResponseFunctor provides an abstract interface for functions which takes a response.
Definition: lgrCommandFunctor.h:36
DtLgrCommandHandlerFunctor provides an implementation of the DtCommandFunctor which wraps a single me...
Definition: lgrCommandFunctor.h:57
DtLgrCommandHandlerFunctor(T *object, ProcCmdFunction function)
The Constructor.
Definition: lgrCommandFunctor.h:17
virtual ~DtResponseFunctor()
Virtual Destructor which does nothing.
Definition: lgrCommandFunctor.h:42
virtual ~DtCommandInterfaceFunctor()
The Destructor.
Definition: lgrCommandFunctor.h:44
DtBoost::shared_ptr< DtResponseFunctor > DtResponseFunctorSP
Definition: lgrCommandFunctor.h:50
T * myObject
Pointer to my object.
Definition: lgrCommandFunctor.h:88
DtResponseFunctor()
Constructor.
Definition: lgrCommandFunctor.h:40
DtCommandFunctor()
Constructor.
Definition: lgrCommandFunctor.h:26
virtual DtResponse operator()(const DtCommand &command)
Function call operator which calls this stored object&#39;s stored member function.
Definition: lgrCommandFunctor.h:30

Document ID: Generated on Mon Mar 22 15:30:17 EDT 2021 from SVN revision 226440
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)