X-Plane Remote Access Plugin and Client Library
Public Member Functions | Static Public Member Functions | List of all members
xplra::GetDataRefTask Class Referenceabstract

#include <GetDataRefTask.h>

Inheritance diagram for xplra::GetDataRefTask:
xplra::DataRefTask xplra::Task xplra::GetArrayDataRefTask< float, GetFloatArrayDataRefTask > xplra::GetArrayDataRefTask< int, GetIntArrayDataRefTask > xplra::GetArrayDataRefTask< unsigned char, GetByteArrayDataRefTask > xplra::GetScalarDataRefTask< double, GetDoubleDataRefTask > xplra::GetScalarDataRefTask< int, GetIntDataRefTask > xplra::GetScalarDataRefTask< float, GetFloatDataRefTask > xplra::GetArrayDataRefTask< T, ConcreteClass > xplra::GetScalarDataRefTask< T, ConcreteClass >

Public Member Functions

 GetDataRefTask (const std::string &name)
 
 GetDataRefTask (XPLMDataRef dataRef)
 
virtual void writeValue (hu::varadiistvan::scpl::io::DataStream &stream)=0
 
- Public Member Functions inherited from xplra::DataRefTask
bool isValid () const
 
const std::string & getName () const
 
XPLMDataRef getDataRef () const
 
- Public Member Functions inherited from xplra::Task
virtual ~Task ()
 

Static Public Member Functions

static GetDataRefTaskcreate (uint8_t &result, hu::varadiistvan::scpl::io::DataStream &stream)
 

Additional Inherited Members

- Protected Member Functions inherited from xplra::DataRefTask
 DataRefTask (const std::string &name)
 
 DataRefTask (XPLMDataRef dataRef)
 
virtual void perform ()
 
virtual void process ()=0
 

Detailed Description

Base class for tasks that query the value of some dataref.

Definition at line 46 of file GetDataRefTask.h.

Constructor & Destructor Documentation

◆ GetDataRefTask() [1/2]

xplra::GetDataRefTask::GetDataRefTask ( const std::string &  name)
inline

Construct the task for the dataref with the given name.

Definition at line 564 of file GetDataRefTask.h.

◆ GetDataRefTask() [2/2]

xplra::GetDataRefTask::GetDataRefTask ( XPLMDataRef  dataRef)
inline

Construct the task for the given dataref.

Definition at line 571 of file GetDataRefTask.h.

Member Function Documentation

◆ create()

GetDataRefTask * GetDataRefTask::create ( uint8_t &  result,
hu::varadiistvan::scpl::io::DataStream &  stream 
)
static

Read a dataref query specification and create the appropriate GetDataRefTask instance.

Returns
the new instance, or 0 on error. In that case the given result reference variable will be filled with the error code, unless the stream failed, in which case it remains RESULT_OK.

Definition at line 50 of file GetDataRefTask.cc.

◆ writeValue()

virtual void xplra::GetDataRefTask::writeValue ( hu::varadiistvan::scpl::io::DataStream &  stream)
pure virtual

The documentation for this class was generated from the following files: