X-Plane Remote Access Plugin and Client Library
|
#include <DataRefTask.h>
Public Member Functions | |
bool | isValid () const |
const std::string & | getName () const |
XPLMDataRef | getDataRef () const |
Public Member Functions inherited from xplra::Task | |
virtual | ~Task () |
Protected Member Functions | |
DataRefTask (const std::string &name) | |
DataRefTask (XPLMDataRef dataRef) | |
virtual void | perform () |
virtual void | process ()=0 |
Private Attributes | |
std::string | name |
XPLMDataRef | dataRef |
A task that works with some dataref. This base class performs the mapping from dataref name to dataref value. The actual operation is performed by the subclasses.
Definition at line 50 of file DataRefTask.h.
|
inlineprotected |
Construct the dataref task for the dataref with the given name.
Definition at line 110 of file DataRefTask.h.
|
inlineprotected |
Construct the dataref task for the given dataref.
Definition at line 118 of file DataRefTask.h.
|
inline |
Get the dataref.
Definition at line 139 of file DataRefTask.h.
|
inline |
Get the name of the dataref.
Definition at line 132 of file DataRefTask.h.
|
inline |
Determine if the task is valid, which is so, if the dataref is not 0.
Definition at line 125 of file DataRefTask.h.
|
protectedvirtual |
Perform the task. If the dataref is not valid yet, it will be queried. If the query is successful, the process() function is called.
Implements xplra::Task.
Definition at line 43 of file DataRefTask.cc.
|
protectedpure virtual |
Process the dataref. When this function is called, the dataref is valid.
Implemented in xplra::SetArrayDataRefTask< T, ConcreteClass >, xplra::SetArrayDataRefTask< float, SetFloatArrayDataRefTask >, xplra::SetArrayDataRefTask< int, SetIntArrayDataRefTask >, xplra::SetArrayDataRefTask< unsigned char, SetByteArrayDataRefTask >, xplra::SetScalarDataRefTask< T, ConcreteClass >, xplra::SetScalarDataRefTask< double, SetDoubleDataRefTask >, xplra::SetScalarDataRefTask< int, SetIntDataRefTask >, xplra::SetScalarDataRefTask< float, SetFloatDataRefTask >, xplra::GetArrayDataRefTask< T, ConcreteClass >, xplra::GetArrayDataRefTask< float, GetFloatArrayDataRefTask >, xplra::GetArrayDataRefTask< int, GetIntArrayDataRefTask >, xplra::GetArrayDataRefTask< unsigned char, GetByteArrayDataRefTask >, xplra::GetScalarDataRefTask< T, ConcreteClass >, xplra::GetScalarDataRefTask< double, GetDoubleDataRefTask >, xplra::GetScalarDataRefTask< int, GetIntDataRefTask >, and xplra::GetScalarDataRefTask< float, GetFloatDataRefTask >.
|
private |
The dataref.
Definition at line 61 of file DataRefTask.h.
|
private |
The name of the dataref.
Definition at line 56 of file DataRefTask.h.