X-Plane Remote Access Plugin and Client Library
|
#include <SetDataRefTask.h>
Public Member Functions | |
SetDataRefTask (const std::string &name) | |
SetDataRefTask (XPLMDataRef dataRef) | |
virtual void | readValue (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 SetDataRefTask * | create (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 |
Base class for dataref tasks that set the value of some data referenced by a dataref.
Since XPLM provides no feedback on whether the setting is successful, we detect only if the dataref is valid or not. So the isValid() function provides the only feedback if the task executed successfully or not. (We could use XPLMCanWriteDataRef, but for efficiency reasons we refrain from it. A separate task may be created for this purpose.)
Definition at line 54 of file SetDataRefTask.h.
|
inline |
Construct the task for the dataref with the given name.
Definition at line 444 of file SetDataRefTask.h.
|
inline |
Construct the task for the given dataref.
Definition at line 451 of file SetDataRefTask.h.
|
static |
Read a dataref setting specification and create the appropriate SetDataRefTask instance.
result | will contain the result of the operation. It signifies an error only, if some wrong data is read. If the stream fails, it will indicate RESULT_OK. |
stream | the stream to read from |
Definition at line 48 of file SetDataRefTask.cc.
|
pure virtual |
Read and set the value to update from the given stream
Implemented in xplra::SetArrayDataRefTask< T, ConcreteClass >, xplra::SetArrayDataRefTask< float, SetFloatArrayDataRefTask >, xplra::SetArrayDataRefTask< int, SetIntArrayDataRefTask >, xplra::SetArrayDataRefTask< unsigned char, SetByteArrayDataRefTask >, xplra::SetDoubleDataRefTask, xplra::SetFloatDataRefTask, and xplra::SetIntDataRefTask.