From c1183565df88728fcdc1595e8eb3d92f5a1a2a12 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Wed, 24 Dec 2025 12:45:44 +0100 Subject: [PATCH] docs(xswiftbus): Add missing documentation --- src/xswiftbus/datarefs.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xswiftbus/datarefs.h b/src/xswiftbus/datarefs.h index 4bc2fe4a4..c5190f17f 100644 --- a/src/xswiftbus/datarefs.h +++ b/src/xswiftbus/datarefs.h @@ -225,13 +225,13 @@ namespace XSwiftBus XPLMDataRef m_ref; }; - /* Helper to conditionally fail compilation if no matching constexpr if case is found */ + /*! Helper to conditionally fail compilation if no matching constexpr if case is found */ template constexpr bool dependent_false = false; /*! * Class providing a custom variable + dataref - * \hint Currently only readable int and std::string datarefs are supported + * Currently only readable int and std::string datarefs are supported * \tparam DataRefTraits The trait class representing the dataref. */ template @@ -271,11 +271,13 @@ namespace XSwiftBus if (m_ref) { XPLMUnregisterDataAccessor(m_ref); } } + //! Read integer static typename DataRefTraits::type readInt(void *refcon) { return reinterpret_cast(refcon)->get(); } + //! Read data/string static int readData(void *refcon, void *out, int offset, int max_length) { if constexpr (std::is_same_v) @@ -301,7 +303,10 @@ namespace XSwiftBus //! Get the value const typename DataRefTraits::type &get() const { return m_datarefVal; } + //! X-Plane dataref XPLMDataRef m_ref; + + //! Dataref content typename DataRefTraits::type m_datarefVal; };