Monado OpenXR Runtime
Loading...
Searching...
No Matches
xrt::util::BlobSinkBase< T > Class Template Reference

CRTP glue wrapper for t_blob_sink. More...

#include <glue/g_blob_sink.hpp>

Public Member Functions

const T & derived () const noexcept
 
T & derived () noexcept
 
const t_blob_sink * getBlobSink () const noexcept
 
t_blob_sink * getBlobSink () noexcept
 

Static Public Member Functions

static const T * fromBlobSink (const t_blob_sink *sink) noexcept
 
static T * fromBlobSink (t_blob_sink *sink) noexcept
 

Detailed Description

template<class T>
class xrt::util::BlobSinkBase< T >

CRTP glue wrapper for t_blob_sink.

Relies on standard layout to recover the derived object from the C struct, and has some requirements and limitations because of that. See C++ glue wrappers for the guide and conventions for these wrappers.

The derived class T must implement:

  • void pushBlobs(t_blob_observation &observation), which takes ownership of the observation's frame reference, see t_blob_observation::frame.
  • static void destroyBlobSink(t_blob_sink *sink), called from t_blob_sink_destroy. It is static because it usually frees the object, similar to destroyFrameNode in FrameNodeBase.

Exceptions thrown from pushBlobs are caught and logged.


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