swift
Public Types | Public Member Functions | Static Public Attributes | List of all members
XSwiftBus::ArrayDataRef< DataRefTraits > Class Template Reference

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

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

Public Types

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

Public Member Functions

 ArrayDataRef ()
 Constructor.
 
void setAll (std::array< DataRefType, DataRefSize > const &a)
 Set the value of the whole array (if it is writable)
 
std::array< DataRefType, DataRefSizegetAll () const
 Get the value of the whole array.
 
void setAt (int index, DataRefType d)
 Set the value of a single element (if it is writable)
 
DataRefType getAt (int index) const
 Get the value of a single element.
 

Static Public Attributes

static constexpr auto DataRefSize = DataRefTraits::size
 Array dataref size.
 

Detailed Description

template<class DataRefTraits>
class XSwiftBus::ArrayDataRef< DataRefTraits >

Class providing access to a single X-Plane array 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 128 of file datarefs.h.


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