ReadSource Class
Lightweight handle for reading messages from a TypeIndexedDoubleBuffer. More...
Declaration
Public Constructors Index
| ReadSource (TypeIndexedDoubleBuffer &db) noexcept | |
|
Constructs a ReadSource from a TypeIndexedDoubleBuffer reference. More... | |
Public Member Functions Index
template <typename E> | |
| auto | read () const noexcept -> std::span< const E > |
|
Returns a read-only view of messages of type E. More... | |
Private Member Attributes Index
| TypeIndexedDoubleBuffer * | db_ = nullptr |
|
Non-owning pointer to the parent buffer. More... | |
Description
Lightweight handle for reading messages from a TypeIndexedDoubleBuffer.
ReadSource provides a focused interface for message consumers that only need read access. It holds a non-owning pointer to a TypeIndexedDoubleBuffer and exposes only the read() operation.
This class is useful for dependency injection where systems should be able to consume messages without having access to buffer management operations.
Definition at line 266 of file TypeIndexedDoubleBuffer.ixx.
Public Constructors
ReadSource()
| inline explicit noexcept |
Constructs a ReadSource from a TypeIndexedDoubleBuffer reference.
- Parameters
-
db The buffer to read from. Must remain valid for the lifetime of this source.
Definition at line 280 of file TypeIndexedDoubleBuffer.ixx.
Reference helios::core::buffer::TypeIndexedDoubleBuffer< Indexer >::TypeIndexedDoubleBuffer.
Public Member Functions
read()
| inline noexcept |
Returns a read-only view of messages of type E.
- Template Parameters
-
E The message type to read.
- Returns
A span over all messages of type E in the read buffer.
Definition at line 290 of file TypeIndexedDoubleBuffer.ixx.
Reference helios::core::buffer::TypeIndexedDoubleBuffer< Indexer >::ReadSource::read.
Referenced by helios::core::buffer::TypeIndexedDoubleBuffer< Indexer >::ReadSource::read.
Private Member Attributes
db_
|
Non-owning pointer to the parent buffer.
Definition at line 271 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.