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

Class providing access to a single X-Plane dataref. More...

#include <datarefs.h>

Inheritance diagram for XSwiftBus::DataRef< DataRefTraits >:
[legend]

Public Types

using TraitsType = DataRefTraits
 Traits type.
using DataRefType = typename DataRefTraits::type
 Dataref type.

Public Member Functions

 DataRef ()
 Constructor.
void set (DataRefType d)
 Set the value of the dataref (if it is writable).
void setAsInt (int d)
 Set as integer, avoids cast warnings such as "possible loss of data".
void setAsDouble (double d)
 Set as integer, avoids cast warnings such as "possible loss of data".
DataRefType get () const
 Get the value of the dataref.

Detailed Description

template<class DataRefTraits>
class XSwiftBus::DataRef< DataRefTraits >

Class providing access to a single X-Plane dataref.

Template Parameters
DataRefTraitsThe trait class representing the dataref. See the xplane::data namespace and http://www.xsquawkbox.net/xpsdk/docs/DataRefs.html

Definition at line 91 of file datarefs.h.

Member Typedef Documentation

◆ DataRefType

template<class DataRefTraits>
using XSwiftBus::DataRef< DataRefTraits >::DataRefType = typename DataRefTraits::type

Dataref type.

Definition at line 103 of file datarefs.h.

◆ TraitsType

template<class DataRefTraits>
using XSwiftBus::DataRef< DataRefTraits >::TraitsType = DataRefTraits

Traits type.

Definition at line 100 of file datarefs.h.

Constructor & Destructor Documentation

◆ DataRef()

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

Constructor.

Definition at line 97 of file datarefs.h.

Member Function Documentation

◆ get()

template<class DataRefTraits>
DataRefType XSwiftBus::DataRef< DataRefTraits >::get ( ) const
inline

Get the value of the dataref.

Definition at line 119 of file datarefs.h.

◆ set()

template<class DataRefTraits>
void XSwiftBus::DataRef< DataRefTraits >::set ( DataRefType d)
inline

Set the value of the dataref (if it is writable).

Definition at line 106 of file datarefs.h.

◆ setAsDouble()

template<class DataRefTraits>
void XSwiftBus::DataRef< DataRefTraits >::setAsDouble ( double d)
inline

Set as integer, avoids cast warnings such as "possible loss of data".

Definition at line 116 of file datarefs.h.

◆ setAsInt()

template<class DataRefTraits>
void XSwiftBus::DataRef< DataRefTraits >::setAsInt ( int d)
inline

Set as integer, avoids cast warnings such as "possible loss of data".

Definition at line 113 of file datarefs.h.


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