WriteSink Class
Lightweight handle for pushing messages to a TypeIndexedDoubleBuffer. More...
Declaration
Public Constructors Index
| WriteSink (TypeIndexedDoubleBuffer &db) noexcept | |
|
Constructs a WriteSink from a TypeIndexedDoubleBuffer reference. More... | |
Public Member Functions Index
template <typename E, typename... Args> | |
| void | push (Args &&... args) noexcept |
|
Constructs and pushes a message of type E to the buffer. More... | |
Private Member Attributes Index
| TypeIndexedDoubleBuffer * | db_ = nullptr |
|
Non-owning pointer to the parent buffer. More... | |
Description
Lightweight handle for pushing messages to a TypeIndexedDoubleBuffer.
WriteSink provides a focused interface for message producers that only need write access. It holds a non-owning pointer to a TypeIndexedDoubleBuffer and exposes only the push() operation.
This class is useful for dependency injection where systems should be able to publish messages without having access to buffer management operations like swapBuffers() or clearReadBuffers().
Definition at line 225 of file TypeIndexedDoubleBuffer.ixx.
Public Constructors
WriteSink()
| inline explicit noexcept |
Constructs a WriteSink from a TypeIndexedDoubleBuffer reference.
- Parameters
-
db The buffer to write to. Must remain valid for the lifetime of this sink.
Definition at line 239 of file TypeIndexedDoubleBuffer.ixx.
Reference helios::core::buffer::TypeIndexedDoubleBuffer< Indexer >::TypeIndexedDoubleBuffer.
Public Member Functions
push()
| inline noexcept |
Constructs and pushes a message of type E to the buffer.
- Template Parameters
-
E The message type.
Args Constructor argument types for E.
- Parameters
-
args Arguments forwarded to E's constructor.
Definition at line 250 of file TypeIndexedDoubleBuffer.ixx.
Reference helios::core::buffer::TypeIndexedDoubleBuffer< Indexer >::WriteSink::push.
Referenced by helios::core::buffer::TypeIndexedDoubleBuffer< Indexer >::WriteSink::push.
Private Member Attributes
db_
|
Non-owning pointer to the parent buffer.
Definition at line 230 of file TypeIndexedDoubleBuffer.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.