Skip to content

Commit c118356

Browse files
committed
docs(xswiftbus): Add missing documentation
1 parent 818c02d commit c118356

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/xswiftbus/datarefs.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ namespace XSwiftBus
225225
XPLMDataRef m_ref;
226226
};
227227

228-
/* Helper to conditionally fail compilation if no matching constexpr if case is found */
228+
/*! Helper to conditionally fail compilation if no matching constexpr if case is found */
229229
template <class...>
230230
constexpr bool dependent_false = false;
231231

232232
/*!
233233
* Class providing a custom variable + dataref
234-
* \hint Currently only readable int and std::string datarefs are supported
234+
* Currently only readable int and std::string datarefs are supported
235235
* \tparam DataRefTraits The trait class representing the dataref.
236236
*/
237237
template <class DataRefTraits>
@@ -271,11 +271,13 @@ namespace XSwiftBus
271271
if (m_ref) { XPLMUnregisterDataAccessor(m_ref); }
272272
}
273273

274+
//! Read integer
274275
static typename DataRefTraits::type readInt(void *refcon)
275276
{
276277
return reinterpret_cast<CustomDataRef *>(refcon)->get();
277278
}
278279

280+
//! Read data/string
279281
static int readData(void *refcon, void *out, int offset, int max_length)
280282
{
281283
if constexpr (std::is_same_v<typename DataRefTraits::type, std::string>)
@@ -301,7 +303,10 @@ namespace XSwiftBus
301303
//! Get the value
302304
const typename DataRefTraits::type &get() const { return m_datarefVal; }
303305

306+
//! X-Plane dataref
304307
XPLMDataRef m_ref;
308+
309+
//! Dataref content
305310
typename DataRefTraits::type m_datarefVal;
306311
};
307312

0 commit comments

Comments
 (0)