swift
Loading...
Searching...
No Matches
XSwiftBus::CustomDataRef< DataRefTraits > Class Template Reference

Class providing a custom variable + dataref Currently only readable int and std::string datarefs are supported. More...

#include <datarefs.h>

Public Member Functions

 CustomDataRef ()
 Constructor.
 CustomDataRef (const CustomDataRef &)=delete
CustomDataRef & operator= (const CustomDataRef &)=delete
 CustomDataRef (CustomDataRef &&other)=delete
CustomDataRef & operator= (CustomDataRef &&other)=delete
bool isValid () const
 True if the dataref exists.
void set (typename DataRefTraits::type val)
 Set the value.
const DataRefTraits::type & get () const
 Get the value.

Static Public Member Functions

static DataRefTraits::type readInt (void *refcon)
 Read integer.
static int readData (void *refcon, void *out, int offset, int max_length)
 Read data/string.

Public Attributes

XPLMDataRef m_ref
 X-Plane dataref.
DataRefTraits::type m_datarefVal
 Dataref content.

Detailed Description

template<class DataRefTraits>
class XSwiftBus::CustomDataRef< DataRefTraits >

Class providing a custom variable + dataref Currently only readable int and std::string datarefs are supported.

Template Parameters
DataRefTraitsThe trait class representing the dataref.

Definition at line 238 of file datarefs.h.

Constructor & Destructor Documentation

◆ CustomDataRef()

template<class DataRefTraits>
XSwiftBus::CustomDataRef< DataRefTraits >::CustomDataRef ( )
inline

Constructor.

Definition at line 242 of file datarefs.h.

◆ ~CustomDataRef()

template<class DataRefTraits>
XSwiftBus::CustomDataRef< DataRefTraits >::~CustomDataRef ( )
inline

Definition at line 272 of file datarefs.h.

Member Function Documentation

◆ get()

template<class DataRefTraits>
const DataRefTraits::type & XSwiftBus::CustomDataRef< DataRefTraits >::get ( ) const
inline

Get the value.

Definition at line 310 of file datarefs.h.

◆ isValid()

template<class DataRefTraits>
bool XSwiftBus::CustomDataRef< DataRefTraits >::isValid ( ) const
inline

True if the dataref exists.

Definition at line 304 of file datarefs.h.

◆ readData()

template<class DataRefTraits>
int XSwiftBus::CustomDataRef< DataRefTraits >::readData ( void * refcon,
void * out,
int offset,
int max_length )
inlinestatic

Read data/string.

Definition at line 287 of file datarefs.h.

◆ readInt()

template<class DataRefTraits>
DataRefTraits::type XSwiftBus::CustomDataRef< DataRefTraits >::readInt ( void * refcon)
inlinestatic

Read integer.

Definition at line 281 of file datarefs.h.

◆ set()

template<class DataRefTraits>
void XSwiftBus::CustomDataRef< DataRefTraits >::set ( typename DataRefTraits::type val)
inline

Set the value.

Definition at line 307 of file datarefs.h.

Member Data Documentation

◆ m_datarefVal

template<class DataRefTraits>
DataRefTraits::type XSwiftBus::CustomDataRef< DataRefTraits >::m_datarefVal

Dataref content.

Definition at line 316 of file datarefs.h.

◆ m_ref

template<class DataRefTraits>
XPLMDataRef XSwiftBus::CustomDataRef< DataRefTraits >::m_ref

X-Plane dataref.

Definition at line 313 of file datarefs.h.


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