47#include <condition_variable>
126 template<StormByte::Type::ByteInputRange R>
135 template<StormByte::Type::ByteInputRange Rr>
219 inline
bool operator!=(const
SharedFIFO& other) const noexcept {
220 return !(*
this == other);
250 virtual
bool Empty() const noexcept override;
256 virtual
bool EoF() const noexcept override;
262 bool HasError() const noexcept;
269 virtual
bool IsReadable() const noexcept override;
276 virtual
bool IsWritable() const noexcept override;
296 void Clean() noexcept override;
303 virtual
void Clear() noexcept override;
311 virtual
void Close() noexcept override;
329 virtual
void Seek(const
std::ptrdiff_t& offset, const
Position& mode) const noexcept override;
336 virtual
void SetError() noexcept override;
362 mutable
std::mutex m_mutex;
363 mutable
std::condition_variable_any m_cv;
369 std::ostringstream HexDumpHeader() const noexcept override;
379 const
Operation& flag) noexcept override;
389 const
Operation& flag) noexcept override;
Byte-oriented FIFO buffer with grow-on-demand and close/error support.
Definition fifo.hxx:78
Operation
Kind of internal read operation.
Definition fifo.hxx:474
Thread-safe FIFO built on top of FIFO.
Definition shared_fifo.hxx:96
SharedFIFO(FIFO &&other) noexcept
Construct by moving a plain FIFO.
Definition shared_fifo.hxx:160
SharedFIFO(StormByte::BinaryData &&data) noexcept
Construct with initial data (move).
Definition shared_fifo.hxx:119
virtual StormByte::ByteSize Available() const noexcept override
Bytes available from the current read position (thread-safe).
SharedFIFO(SharedFIFO &&)=delete
Move constructor (deleted – mutex / condition_variable are not movable).
SharedFIFO(const char *s) noexcept
Construct from a null-terminated C string.
Definition shared_fifo.hxx:148
SharedFIFO(const FIFO &other)
Construct by copying a plain FIFO.
Definition shared_fifo.hxx:154
SharedFIFO(const R &r) noexcept
Construct from an input range (copy / convert).
Definition shared_fifo.hxx:128
virtual ~SharedFIFO() noexcept
Virtual destructor.
SharedFIFO(std::string_view sv) noexcept
Construct from a string view (no trailing NUL).
Definition shared_fifo.hxx:142
SharedFIFO(Rr &&r) noexcept
Construct from an rvalue range.
Definition shared_fifo.hxx:136
SharedFIFO(const SharedFIFO &)=delete
Copy constructor (deleted – synchronization primitives are not copyable).
SharedFIFO() noexcept=default
Default construct an empty SharedFIFO.
Buffer that can be written and not read.
Definition generic.hxx:505
Buffer module of the StormByte suite.
Position
Forward declaration of the WriteOnly interface.
Definition typedefs.hxx:73
Root namespace of the StormByte C++ suite.
#define STORMBYTE_BUFFER_PUBLIC
Definition visibility.h:54