Skip to content

Stream

#include <sbio/core/stream.hh>
template<class IO, class FTraits>
class Stream

Defined 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.

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
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

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).


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.


inline

inline SBIO_HDIOStatus read_one(void * dest, std::size_t buf_size)

Defined in src/lib/sbio/core/stream.hh:74


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


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

Return Name Description
std::size_t m_current_offset
std::size_t m_batch_size
std::size_t m_missing_chunk

std::size_t m_current_offset { 0 }

Defined in src/lib/sbio/core/stream.hh:135


std::size_t m_batch_size { 0 }

Defined in src/lib/sbio/core/stream.hh:136


std::size_t m_missing_chunk { 0 }

Defined in src/lib/sbio/core/stream.hh:137