Stream
Stream
Section titled “Stream”#include <sbio/core/stream.hh>template<class IO, class FTraits>class StreamDefined in src/lib/sbio/core/stream.hh:45
Inherits:
IO
A light-weight wrapper over an IO engine.
The Stream abstraction provides access to the underlying IO mechanics by dispatching format-specific access patterns. The channel itself does not maintain state or own any memory buffers. These are provided by the callers in their requests.
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
apply_read |
function |
Declared here |
apply_write |
function |
Declared here |
read_one |
function |
Declared here |
read_batch |
function |
Declared here |
read_at |
function |
Declared here |
m_current_offset |
variable |
Declared here |
m_batch_size |
variable |
Declared here |
m_missing_chunk |
variable |
Declared here |
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
SBIO_HD auto |
apply_read inline |
Dispatch a read algorithm (Style or AccessStyle) onto the channel. The style maintains relative state to apply its algorithm such as seek offsets. The ReadRequest contains the targets for reads (buffers). |
SBIO_HD auto |
apply_write inline |
As with apply_read, dispatch a styled write onto the channel. |
SBIO_HDIOStatus |
read_one inline |
|
SBIO_HDIOStatus |
read_batch inline |
|
SBIO_HDIOStatus |
read_at inline |
apply_read
Section titled “apply_read”inline
template<typename Style> inline SBIO_HD auto apply_read(Style & style, const typename Style::ReadRequest & req)Defined in src/lib/sbio/core/stream.hh:60
Dispatch a read algorithm (Style or AccessStyle) onto the channel. The style maintains relative state to apply its algorithm such as seek offsets. The ReadRequest contains the targets for reads (buffers).
apply_write
Section titled “apply_write”inline
template<typename Style> inline SBIO_HD auto apply_write(Style & style, const typename Style::WriteRequest & req)Defined in src/lib/sbio/core/stream.hh:69
As with apply_read, dispatch a styled write onto the channel.
read_one
Section titled “read_one”inline
inline SBIO_HDIOStatus read_one(void * dest, std::size_t buf_size)Defined in src/lib/sbio/core/stream.hh:74
read_batch
Section titled “read_batch”inline
inline SBIO_HDIOStatus read_batch(void * dest, std::size_t batch_size, std::size_t missing_chunk = 0)Defined in src/lib/sbio/core/stream.hh:97
read_at
Section titled “read_at”inline
inline SBIO_HDIOStatus read_at(void * dest, std::size_t offset, std::size_t read_size)Defined in src/lib/sbio/core/stream.hh:118
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
std::size_t |
m_current_offset |
|
std::size_t |
m_batch_size |
|
std::size_t |
m_missing_chunk |
m_current_offset
Section titled “m_current_offset”std::size_t m_current_offset { 0 }Defined in src/lib/sbio/core/stream.hh:135
m_batch_size
Section titled “m_batch_size”std::size_t m_batch_size { 0 }Defined in src/lib/sbio/core/stream.hh:136
m_missing_chunk
Section titled “m_missing_chunk”std::size_t m_missing_chunk { 0 }Defined in src/lib/sbio/core/stream.hh:137