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

#include <SetDataRefTask.h>

Inheritance diagram for xplra::SetArrayDataRefTask< T, ConcreteClass >:
xplra::SetDataRefTask xplra::DataRefTask xplra::Task

Public Member Functions

 SetArrayDataRefTask (const std::string &name, int count, int offset=0)
 
 SetArrayDataRefTask (XPLMDataRef dataRef, int count, int offset=0)
 
virtual ~SetArrayDataRefTask ()
 
virtual void readValue (hu::varadiistvan::scpl::io::DataStream &stream)
 
- Public Member Functions inherited from xplra::SetDataRefTask
 SetDataRefTask (const std::string &name)
 
 SetDataRefTask (XPLMDataRef dataRef)
 
- 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

int count
 
int offset
 
T * value
 

Additional Inherited Members

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

Detailed Description

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

Base class for dataref setting tasks that set the values of an array.

ConcreteClass is the actual child class. It should have a function name setData() which performs the actual setting.

Definition at line 229 of file SetDataRefTask.h.

Constructor & Destructor Documentation

◆ SetArrayDataRefTask() [1/2]

template<typename T , class ConcreteClass >
xplra::SetArrayDataRefTask< T, ConcreteClass >::SetArrayDataRefTask ( const std::string &  name,
int  count,
int  offset = 0 
)
inline

Construct the data setting task for the dataref with the given name.

The value array will be allocated, but not filled with data. Thus count should be positive!

Definition at line 394 of file SetDataRefTask.h.

◆ SetArrayDataRefTask() [2/2]

template<typename T , class ConcreteClass >
xplra::SetArrayDataRefTask< T, ConcreteClass >::SetArrayDataRefTask ( XPLMDataRef  dataRef,
int  count,
int  offset = 0 
)
inline

Construct the data setting task for the given dataref.

The value array will be allocated, but not filled with data. Thus count should be positive!

Definition at line 406 of file SetDataRefTask.h.

◆ ~SetArrayDataRefTask()

template<typename T , class ConcreteClass >
xplra::SetArrayDataRefTask< T, ConcreteClass >::~SetArrayDataRefTask
inlinevirtual

Destroy the task.

Definition at line 418 of file SetDataRefTask.h.

Member Function Documentation

◆ process()

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

Perform the actual operation.

Implements xplra::DataRefTask.

Definition at line 435 of file SetDataRefTask.h.

◆ readValue()

template<typename T , class ConcreteClass >
void xplra::SetArrayDataRefTask< T, ConcreteClass >::readValue ( hu::varadiistvan::scpl::io::DataStream &  stream)
virtual

Read and set the value to update from the given stream

Implements xplra::SetDataRefTask.

Definition at line 426 of file SetDataRefTask.h.

Member Data Documentation

◆ count

template<typename T , class ConcreteClass >
int xplra::SetArrayDataRefTask< T, ConcreteClass >::count
private

The number of data items in the value.

Definition at line 235 of file SetDataRefTask.h.

◆ offset

template<typename T , class ConcreteClass >
int xplra::SetArrayDataRefTask< T, ConcreteClass >::offset
private

The offset starting with which the data should be set.

Definition at line 240 of file SetDataRefTask.h.

◆ value

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

The value to set.

Definition at line 245 of file SetDataRefTask.h.


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