29 #ifndef XPLRA_GETDATAREFTASK_H
30 #define XPLRA_GETDATAREFTASK_H
33 #include "DataRefTask.h"
35 #include <hu/varadiistvan/scpl/io/DataStream.h>
58 hu::varadiistvan::scpl::io::DataStream& stream);
73 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream) = 0;
84 template <
typename T,
class ConcreteClass>
144 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
176 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
208 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
220 template <
typename T,
class ConcreteClass>
296 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
415 int maxBytes = -1,
int offset = 0);
428 int maxBytes = -1,
int offset = 0);
435 template <
typename T,
class ConcreteClass>
445 template <
typename T,
class ConcreteClass>
455 template <
typename T,
class ConcreteClass>
463 template <
typename T,
class ConcreteClass>
466 value = ConcreteClass::queryData(getDataRef());
472 template <
typename T,
class ConcreteClass>
478 data( (maxCount>0) ? new T[maxCount] : 0 ),
485 template <
typename T,
class ConcreteClass>
491 data( (maxCount>0) ? new T[maxCount] : 0),
498 template <
typename T,
class ConcreteClass>
506 template <
typename T,
class ConcreteClass>
514 template <
typename T,
class ConcreteClass>
522 template <
typename T,
class ConcreteClass>
526 maxCount = ConcreteClass::queryData(getDataRef(), 0, 0, 0);
533 data =
new T[maxCount];
542 length = ConcreteClass::queryData(getDataRef(), data, offset, maxCount);
550 template <
typename T,
class ConcreteClass>
552 writeValue(hu::varadiistvan::scpl::io::DataStream& stream)
554 stream.writeS32(length);
556 stream.write(data, length *
sizeof(T));
646 int offset,
int count)
655 int maxCount,
int offset) :
664 int maxCount,
int offset) :
674 int offset,
int count)
683 int maxCount,
int offset) :
692 int maxCount,
int offset) :
702 int offset,
int count)
711 int maxBytes,
int offset) :
721 int maxBytes,
int offset) :
GetArrayDataRefTask(const std::string &name, int maxCount=-1, int offset=0)
virtual ~GetArrayDataRefTask()
const T * getData() const
GetArrayDataRefTask(XPLMDataRef dataRef, int maxCount=-1, int offset=0)
virtual void writeValue(hu::varadiistvan::scpl::io::DataStream &stream)
static int queryData(XPLMDataRef dataRef, void *dest, int offset, int count)
GetByteArrayDataRefTask(const std::string &name, int maxBytes=-1, int offset=0)
virtual void writeValue(hu::varadiistvan::scpl::io::DataStream &stream)=0
static GetDataRefTask * create(uint8_t &result, hu::varadiistvan::scpl::io::DataStream &stream)
GetDataRefTask(const std::string &name)
virtual void writeValue(hu::varadiistvan::scpl::io::DataStream &stream)
static double queryData(XPLMDataRef dataRef)
GetDoubleDataRefTask(const std::string &name)
static int queryData(XPLMDataRef dataRef, float *dest, int offset, int count)
GetFloatArrayDataRefTask(const std::string &name, int maxCount=-1, int offset=0)
virtual void writeValue(hu::varadiistvan::scpl::io::DataStream &stream)
static float queryData(XPLMDataRef dataRef)
GetFloatDataRefTask(const std::string &name)
static int queryData(XPLMDataRef dataRef, int *dest, int offset, int count)
GetIntArrayDataRefTask(const std::string &name, int maxCount=-1, int offset=0)
GetIntDataRefTask(const std::string &name)
virtual void writeValue(hu::varadiistvan::scpl::io::DataStream &stream)
static int queryData(XPLMDataRef dataRef)
GetScalarDataRefTask(const std::string &name)
GetScalarDataRefTask(XPLMDataRef dataRef)
Python client module for the X-Plane Remote Access plugin.