X-Plane Remote Access Plugin and Client Library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
xplra::GetScalarDataRefTask< T, ConcreteClass > Class Template Reference

#include <GetDataRefTask.h>

Inheritance diagram for xplra::GetScalarDataRefTask< T, ConcreteClass >:
xplra::GetDataRefTask xplra::DataRefTask xplra::Task

Public Member Functions

 GetScalarDataRefTask (const std::string &name)
 
 GetScalarDataRefTask (XPLMDataRef dataRef)
 
getValue () const
 
- Public Member Functions inherited from xplra::GetDataRefTask
 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 ()
 

Protected Member Functions

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

Private Attributes

value
 

Additional Inherited Members

- Static Public Member Functions inherited from xplra::GetDataRefTask
static GetDataRefTaskcreate (uint8_t &result, hu::varadiistvan::scpl::io::DataStream &stream)
 

Detailed Description

template<typename T, class ConcreteClass>
class xplra::GetScalarDataRefTask< T, ConcreteClass >

Base class for dataref querying tasks that query some scalar value.

ConcreteClass is the actual child class. It should have a function called queryData, which wraps the corresponding function in XPLM.

Definition at line 85 of file GetDataRefTask.h.

Constructor & Destructor Documentation

◆ GetScalarDataRefTask() [1/2]

template<typename T , class ConcreteClass >
xplra::GetScalarDataRefTask< T, ConcreteClass >::GetScalarDataRefTask ( const std::string &  name)
inline

Construct the task for the dataref with the given name.

Definition at line 436 of file GetDataRefTask.h.

◆ GetScalarDataRefTask() [2/2]

template<typename T , class ConcreteClass >
xplra::GetScalarDataRefTask< T, ConcreteClass >::GetScalarDataRefTask ( XPLMDataRef  dataRef)
inline

Construct the task for the given dataref.

Definition at line 446 of file GetDataRefTask.h.

Member Function Documentation

◆ getValue()

template<typename T , class ConcreteClass >
T xplra::GetScalarDataRefTask< T, ConcreteClass >::getValue
inline

Get the value

Definition at line 456 of file GetDataRefTask.h.

◆ process()

template<typename T , class ConcreteClass >
void xplra::GetScalarDataRefTask< T, ConcreteClass >::process
protectedvirtual

Perform the actual operation.

Implements xplra::DataRefTask.

Definition at line 464 of file GetDataRefTask.h.

Member Data Documentation

◆ value

template<typename T , class ConcreteClass >
T xplra::GetScalarDataRefTask< T, ConcreteClass >::value
private

The value retrieved.

Definition at line 91 of file GetDataRefTask.h.


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