42 static_assert(std::is_standard_layout_v<BlobSinkBase>,
43 "glue base must be standard layout for pointer recovery");
44 static_assert(is_non_virtual_base_v<BlobSinkBase, T>,
45 "glue base must be a non-virtual base of T for pointer recovery");
48 mBlobSink.
destroy = destroyBlobSinkWrap;
54 derived()
const noexcept
56 return static_cast<const T &
>(*this);
62 return static_cast<T &
>(*this);
68 return &(
reinterpret_cast<const BlobSinkBase *
>(sink)->derived());
74 return &(
reinterpret_cast<BlobSinkBase *
>(sink)->derived());
78 getBlobSink()
const noexcept
84 getBlobSink()
noexcept
102#define GET(sink) (*fromBlobSink(sink))
107 GET(sink).pushBlobs(*observation);
112 destroyBlobSinkWrap(
struct t_blob_sink *sink)
noexcept
114 T::destroyBlobSink(sink);
CRTP glue wrapper for t_blob_sink.
Definition g_blob_sink.hpp:38
Catch guards for glue classes.
Shared type traits for glue classes.
Definition t_constellation.h:104
A generic interface to allow a tracking system to receive "snapshots" of seen t_blob in a frame.
Definition t_constellation.h:136
void(* push_blobs)(struct t_blob_sink *tbs, struct t_blob_observation *observation)
Push a set of blobs into the sink.
Definition t_constellation.h:144
void(* destroy)(struct t_blob_sink *tbs)
Destroy this blob sink.
Definition t_constellation.h:149
Header defining the tracking system integration in Monado.