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

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

#include <datarefs.h>

Public Member Functions

 StringDataRef ()
 Constructor.
bool isValid () const
 True if the dataref exists.
void set (std::string const &s)
 Set the value of the whole string (if it is writable).
std::string get () const
 Get the value of the whole string.
void setSubstr (size_t offset, std::string const &s)
 Set the value of part of the string (if it is writable).
std::string getSubstr (size_t offset, size_t size) const
 Get the value of part of the string.

Detailed Description

template<class DataRefTraits>
class XSwiftBus::StringDataRef< DataRefTraits >

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

Constructor & Destructor Documentation

◆ StringDataRef()

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

Constructor.

Definition at line 187 of file datarefs.h.

Member Function Documentation

◆ get()

template<class DataRefTraits>
std::string XSwiftBus::StringDataRef< DataRefTraits >::get ( ) const
inline

Get the value of the whole string.

Definition at line 204 of file datarefs.h.

◆ getSubstr()

template<class DataRefTraits>
std::string XSwiftBus::StringDataRef< DataRefTraits >::getSubstr ( size_t offset,
size_t size ) const
inline

Get the value of part of the string.

Definition at line 215 of file datarefs.h.

◆ isValid()

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

True if the dataref exists.

Definition at line 198 of file datarefs.h.

◆ set()

template<class DataRefTraits>
void XSwiftBus::StringDataRef< DataRefTraits >::set ( std::string const & s)
inline

Set the value of the whole string (if it is writable).

Definition at line 201 of file datarefs.h.

◆ setSubstr()

template<class DataRefTraits>
void XSwiftBus::StringDataRef< DataRefTraits >::setSubstr ( size_t offset,
std::string const & s )
inline

Set the value of part of the string (if it is writable).

Definition at line 207 of file datarefs.h.


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