StormByte-Buffer 4.0.0
C++26 buffer module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Buffer::SharedFIFO Class Reference

Thread-safe FIFO built on top of FIFO. More...

#include <StormByte/buffer/shared_fifo.hxx>

Inheritance diagram for StormByte::Buffer::SharedFIFO:
Collaboration diagram for StormByte::Buffer::SharedFIFO:

Public Member Functions

Constructors / destructor / assignment
 SharedFIFO () noexcept
 Default construct an empty SharedFIFO.
 SharedFIFO (const StormByte::Safe::Binary &data)
 Construct with initial data (copy).
 SharedFIFO (StormByte::Safe::Binary &&data) noexcept
 Construct with initial data (move).
template<StormByte::Type::ByteInputRange R>
requires (!StormByte::Type::SameAs<R, StormByte::Safe::Binary>)
STORMBYTE_FORCE_INLINE SharedFIFO (const R &r) noexcept
 Construct from an input range.
template<StormByte::Type::ByteInputRange Rr>
STORMBYTE_FORCE_INLINE SharedFIFO (Rr &&r) noexcept
 Construct from an rvalue range.
 SharedFIFO (std::string_view sv) noexcept
 Construct from a string view.
 SharedFIFO (const char *s) noexcept
 Construct from a C string.
 SharedFIFO (const FIFO &other)
 Construct by copying a plain FIFO.
 SharedFIFO (FIFO &&other) noexcept
 Construct by moving a plain FIFO.
 SharedFIFO (const SharedFIFO &)=delete
 Copy constructor.
 SharedFIFO (SharedFIFO &&)=delete
 Move constructor.
virtual ~SharedFIFO () noexcept
 Destroy the SharedFIFO.
SharedFIFO & operator= (const FIFO &other)
 Copy-assign from a plain FIFO.
SharedFIFO & operator= (FIFO &&other) noexcept
 Move-assign from a plain FIFO.
SharedFIFO & operator= (const SharedFIFO &)=delete
 Copy assignment.
SharedFIFO & operator= (SharedFIFO &&)=delete
 Move assignment.
Comparison
bool operator== (const SharedFIFO &other) const noexcept
 Compare two SharedFIFOs.
bool operator!= (const SharedFIFO &other) const noexcept
 Compare two SharedFIFOs.
Queries
virtual StormByte::ByteSize Available () const noexcept override
 Bytes available from the current read position.
virtual const StormByte::Safe::Binary & Data () const noexcept override
 Access the internal storage.
virtual bool Empty () const noexcept override
 Whether the underlying storage is empty.
virtual bool EoF () const noexcept override
 End-of-stream condition.
bool HasError () const noexcept
 Whether the buffer is in a permanent error state.
virtual bool IsReadable () const noexcept override
 Whether the buffer can still be read.
virtual bool IsWritable () const noexcept override
 Whether the buffer accepts writes.
virtual StormByte::ByteSize Size () const noexcept override
 Total number of bytes stored.
Maintenance / lifecycle
void Clean () noexcept override
 Discard data from the start up to the read position.
virtual void Clear () noexcept override
 Clear stored bytes.
virtual void Close () noexcept override
 Close for further writes and notify waiters.
virtual bool Drop (const StormByte::ByteSize &count) noexcept override
 Discard unread bytes and notify waiters.
virtual void Seek (const std::ptrdiff_t &offset, const Position &mode) const noexcept override
 Move the logical read position and notify waiters.
virtual void SetError () noexcept override
 Enter the permanent error state and notify waiters.
Diagnostics
virtual StormByte::Safe::String HexDump (const StormByte::ByteSize &columns=0, const StormByte::ByteSize &byte_limit=0) const noexcept override
 Hexdump of unread contents.
Public Member Functions inherited from StormByte::Buffer::FIFO
 FIFO () noexcept=default
 Default construct an empty FIFO.
 FIFO (const StormByte::Safe::Binary &data) noexcept
 Construct a FIFO with initial data (copy).
 FIFO (StormByte::Safe::Binary &&data) noexcept
 Construct a FIFO with initial data (move).
template<Type::ByteInputRange R>
requires (!Type::SameAs<R, StormByte::Safe::Binary>)
 FIFO (const R &r) noexcept
 Construct a FIFO from an input range.
template<Type::ByteInputRange Rr>
 FIFO (Rr &&r) noexcept
 Construct a FIFO from an rvalue range.
 FIFO (std::string_view sv) noexcept
 Construct a FIFO from a string view.
 FIFO (const char *s) noexcept
 Construct a FIFO from a C string.
 FIFO (const FIFO &other) noexcept
 Copy a FIFO, including contents and state.
 FIFO (FIFO &&other) noexcept
 Take a FIFO.
virtual ~FIFO () noexcept
 Destroy the FIFO.
FIFO & operator= (const FIFO &other)
 Copy-assign a FIFO, including contents and state.
FIFO & operator= (FIFO &&other) noexcept
 Move-assign a FIFO.
bool operator== (const FIFO &other) const noexcept
 Compare two FIFOs.
bool operator!= (const FIFO &other) const noexcept
 Compare two FIFOs.
bool Extract (const StormByte::ByteSize &count, StormByte::Safe::Binary &outBuffer) noexcept override
 Extract bytes into owned storage.
bool Extract (const StormByte::ByteSize &count, WriteOnly &outBuffer) noexcept override
 Extract bytes into a writer.
void ExtractUntilEoF (StormByte::Safe::Binary &outBuffer) noexcept override
 Extract until EoF into owned storage.
void ExtractUntilEoF (WriteOnly &outBuffer) noexcept override
 Extract until EoF into a writer.
bool Extract (StormByte::Safe::Binary &outBuffer) noexcept
 Bring the ReadOnly convenience Extract overloads into scope.
bool Extract (WriteOnly &outBuffer) noexcept
 Bring the ReadOnly convenience Extract overloads into scope.
bool Read (const StormByte::ByteSize &count, StormByte::Safe::Binary &outBuffer) const noexcept override
 Read into owned storage and advance the position.
bool Read (const StormByte::ByteSize &count, WriteOnly &outBuffer) const noexcept override
 Read into a writer and advance the position.
void ReadUntilEoF (StormByte::Safe::Binary &outBuffer) const noexcept override
 Read until EoF into owned storage.
void ReadUntilEoF (WriteOnly &outBuffer) const noexcept override
 Read until EoF into a writer.
bool Read (StormByte::Safe::Binary &outBuffer) const noexcept
 Bring the ReadOnly convenience Read overloads into scope.
bool Read (WriteOnly &outBuffer) const noexcept
 Bring the ReadOnly convenience Read overloads into scope.
bool Peek (const StormByte::ByteSize &count, StormByte::Safe::Binary &outBuffer) const noexcept override
 Peek into owned storage without advancing the position.
bool Peek (const StormByte::ByteSize &count, WriteOnly &outBuffer) const noexcept override
 Peek into a writer without advancing the position.
bool Write (const StormByte::ByteSize &count, const StormByte::Safe::Binary &data) noexcept override
 Append bytes from owned storage (copy).
bool Write (const StormByte::ByteSize &count, StormByte::Safe::Binary &&data) noexcept override
 Append bytes from owned storage (move).
bool Write (const StormByte::ByteSize &count, const ReadOnly &data) noexcept override
 Append bytes from a readable buffer (copy).
bool Write (const StormByte::ByteSize &count, ReadOnly &&data) noexcept override
 Append bytes from a readable buffer (extract path).
bool Write (const ReadOnly &data) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
bool Write (ReadOnly &&data) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
bool Write (std::string_view sv) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
bool Write (const char *s) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
bool Write (const StormByte::ByteSize &count, std::string_view sv) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
bool Write (const StormByte::ByteSize &count, const char *s) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<std::size_t N>
bool Write (const char(&s)[N]) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<Type::ByteInputRange R>
STORMBYTE_FORCE_INLINE bool Write (const R &r) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<Type::ByteInputRange Rw>
STORMBYTE_FORCE_INLINE bool Write (const StormByte::ByteSize &count, const Rw &r) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<Type::ByteInputRange Rrw>
STORMBYTE_FORCE_INLINE bool Write (const StormByte::ByteSize &count, Rrw &&r) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<Type::ByteInputRange Rr>
STORMBYTE_FORCE_INLINE bool Write (Rr &&r) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<Type::ByteInputIterator I, typename S>
requires Type::SentinelFor<S, I>
STORMBYTE_FORCE_INLINE bool Write (I first, S last) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
template<Type::ByteInputIterator I2, typename S2>
requires Type::SentinelFor<S2, I2>
STORMBYTE_FORCE_INLINE bool Write (const StormByte::ByteSize &count, I2 first, S2 last) noexcept
 Bring the WriteOnly convenience Write overloads into scope.
Public Member Functions inherited from StormByte::Buffer::ReadWrite
 ReadWrite () noexcept
 Default constructor.
 ReadWrite (const ReadWrite &other) noexcept
 Copy constructor.
 ReadWrite (ReadWrite &&other) noexcept
 Move constructor.
virtual ~ReadWrite () noexcept
 Destructor.
ReadWrite & operator= (const ReadWrite &other) noexcept
 Copy assignment.
ReadWrite & operator= (ReadWrite &&other) noexcept
 Move assignment.
Public Member Functions inherited from StormByte::Buffer::ReadOnly
 ReadOnly () noexcept
 Default constructor.
 ReadOnly (const ReadOnly &other) noexcept
 Copy constructor.
 ReadOnly (ReadOnly &&other) noexcept
 Move constructor.
virtual ~ReadOnly () noexcept
 Destructor.
ReadOnly & operator= (const ReadOnly &other) noexcept
 Copy assignment.
ReadOnly & operator= (ReadOnly &&other) noexcept
 Move assignment.
bool Extract (StormByte::Safe::Binary &outBuffer) noexcept
 Extract all available bytes into a StormByte::Safe::Binary.
bool Extract (WriteOnly &outBuffer) noexcept
 Extract all available bytes into a WriteOnly.
bool Read (StormByte::Safe::Binary &outBuffer) const noexcept
 Read all available bytes into a StormByte::Safe::Binary.
bool Read (WriteOnly &outBuffer) const noexcept
 Read all available bytes into a WriteOnly.
Public Member Functions inherited from StormByte::Buffer::Generic
 Generic () noexcept
 Default constructor.
 Generic (const Generic &other) noexcept
 Copy constructor.
 Generic (Generic &&other) noexcept
 Move constructor.
virtual ~Generic () noexcept=0
 Pure virtual destructor.
Generic & operator= (const Generic &other) noexcept
 Copy assignment.
Generic & operator= (Generic &&other) noexcept
 Move assignment.
Public Member Functions inherited from StormByte::Buffer::WriteOnly
 WriteOnly () noexcept
 Default constructor.
 WriteOnly (const WriteOnly &other) noexcept
 Copy constructor.
 WriteOnly (WriteOnly &&other) noexcept
 Move constructor.
virtual ~WriteOnly () noexcept
 Destructor.
WriteOnly & operator= (const WriteOnly &other) noexcept
 Copy assignment.
WriteOnly & operator= (WriteOnly &&other) noexcept
 Move assignment.
bool Write (const ReadOnly &data) noexcept
 Append all available bytes from a ReadOnly (copy).
bool Write (ReadOnly &&data) noexcept
 Append all available bytes from a ReadOnly (extract).
bool Write (std::string_view sv) noexcept
 Write a string view.
bool Write (const char *s) noexcept
 Write a C string.
bool Write (const StormByte::ByteSize &count, std::string_view sv) noexcept
 Write up to count characters of a string view.
bool Write (const StormByte::ByteSize &count, const char *s) noexcept
 Write up to count characters of a C string.
template<std::size_t N>
bool Write (const char(&s)[N]) noexcept
 Write a string literal without the trailing NUL.
template<Type::ByteInputRange R>
STORMBYTE_FORCE_INLINE bool Write (const R &r) noexcept
 Write all elements from an input range.
template<Type::ByteInputRange Rw>
STORMBYTE_FORCE_INLINE bool Write (const StormByte::ByteSize &count, const Rw &r) noexcept
 Write up to count elements from an input range.
template<Type::ByteInputRange Rrw>
STORMBYTE_FORCE_INLINE bool Write (const StormByte::ByteSize &count, Rrw &&r) noexcept
 Write up to count elements from an rvalue range.
template<Type::ByteInputRange Rr>
STORMBYTE_FORCE_INLINE bool Write (Rr &&r) noexcept
 Write all elements from an rvalue range.
template<Type::ByteInputIterator I, typename S>
requires Type::SentinelFor<S, I>
STORMBYTE_FORCE_INLINE bool Write (I first, S last) noexcept
 Write all elements from an iterator pair.
template<Type::ByteInputIterator I2, typename S2>
requires Type::SentinelFor<S2, I2>
STORMBYTE_FORCE_INLINE bool Write (const StormByte::ByteSize &count, I2 first, S2 last) noexcept
 Write up to count elements from an iterator pair.

Additional Inherited Members

Protected Types inherited from StormByte::Buffer::FIFO
enum class  Operation { Extract , Read , Peek }
 Kind of internal read operation. More...
Protected Member Functions inherited from StormByte::Buffer::FIFO
StormByte::ByteSize AvailableInternal () const noexcept
 Return unread bytes without virtual dispatch.
virtual void ReadUntilEoFInternal (StormByte::Safe::Binary &outBuffer, const Operation &flag) noexcept
 Drain until EoF into owned storage.
virtual void ReadUntilEoFInternal (WriteOnly &outBuffer, const Operation &flag) noexcept
 Drain until EoF into a writer.
virtual bool WriteInternal (const StormByte::ByteSize &count, const ReadOnly &src) noexcept
 Append from a readable buffer (copy).
virtual bool WriteInternal (const StormByte::ByteSize &count, ReadOnly &&src) noexcept
 Append from a readable buffer (extract path).
Static Protected Member Functions inherited from StormByte::Buffer::FIFO
static StormByte::Safe::String FormatHexLines (std::span< const std::byte > &data, StormByte::ByteSize start_offset, StormByte::ByteSize columns) noexcept
 Format hex/ASCII lines for a data span.
Static Protected Member Functions inherited from StormByte::Buffer::Generic
template<Type::ByteInputRange Src>
static STORMBYTE_FORCE_INLINE Safe::Binary DataConvert (const Src &src) noexcept
 Convert an lvalue input range to StormByte::Safe::Binary.
template<Type::ByteInputRange Src>
static STORMBYTE_FORCE_INLINE Safe::Binary DataConvert (Src &&src) noexcept
 Convert an rvalue input range to StormByte::Safe::Binary.
static Safe::Binary DataConvert (std::string_view sv) noexcept
 Convert a string view to StormByte::Safe::Binary.
static Safe::Binary DataConvert (const char *s) noexcept
 Convert a C string to StormByte::Safe::Binary.
Protected Attributes inherited from StormByte::Buffer::FIFO
StormByte::Safe::Binary m_buffer
 Owned contiguous byte storage.
StormByte::ByteSize m_position_offset {0}
 Logical read offset from the start of m_buffer.
bool m_closed {false}
 Once true, further writes fail.
bool m_error {false}
 Permanent error: unreadable and unwritable.

Detailed Description

Thread-safe FIFO built on top of FIFO.

SharedFIFO wraps the non-thread-safe FIFO with a mutex and a condition variable. It preserves the byte-oriented FIFO semantics and adds blocking reads and extracts.

Read and Extract with a count greater than zero block until that many bytes are available, or until Close() or SetError(). A count of zero returns immediately with whatever is available.

Close() marks the FIFO closed and notifies waiters. Later Write calls fail. Waiters complete with whatever is presently available.

SetError() puts the buffer into a permanent error state and wakes all waiters. Seek() updates the non-destructive read position and notifies waiters.

All public member functions are thread-safe. Closed and error flags are owned by the base FIFO. SharedFIFO only protects access and notifies.

Construction from StormByte::Safe::Binary, a byte range, a string view, a C string or a FIFO is implicit.

See also
FIFO, Ring, Producer, Consumer

Constructor & Destructor Documentation

◆ SharedFIFO() [1/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( )
noexcept

Default construct an empty SharedFIFO.

◆ SharedFIFO() [2/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( const StormByte::Safe::Binary & data)

Construct with initial data (copy).

Implicit.

Parameters
dataInitial bytes.

◆ SharedFIFO() [3/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( StormByte::Safe::Binary && data)
noexcept

Construct with initial data (move).

Implicit.

Parameters
dataInitial bytes. Moved into the base FIFO.

◆ SharedFIFO() [4/11]

STORMBYTE_FORCE_INLINE StormByte::Buffer::SharedFIFO::SharedFIFO ( const R & r)
inlinenoexcept

Construct from an input range.

Implicit.

Template Parameters
RRange whose value converts to std::byte.
Parameters
rSource range. Disabled when it is already StormByte::Safe::Binary.

◆ SharedFIFO() [5/11]

STORMBYTE_FORCE_INLINE StormByte::Buffer::SharedFIFO::SharedFIFO ( Rr && r)
inlinenoexcept

Construct from an rvalue range.

Implicit.

Template Parameters
RrRange type. Moved when it is StormByte::Safe::Binary.
Parameters
rSource range.

◆ SharedFIFO() [6/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( std::string_view sv)
noexcept

Construct from a string view.

Implicit. No trailing NUL.

Parameters
svSource characters.

◆ SharedFIFO() [7/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( const char * s)
noexcept

Construct from a C string.

Implicit.

Parameters
sSource. Null yields an empty buffer.

◆ SharedFIFO() [8/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( const FIFO & other)

Construct by copying a plain FIFO.

Parameters
otherSource FIFO.

◆ SharedFIFO() [9/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( FIFO && other)
noexcept

Construct by moving a plain FIFO.

Parameters
otherSource FIFO. Left empty after the move.

◆ SharedFIFO() [10/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( const SharedFIFO & )
delete

Copy constructor.

Deleted: the mutex is not copyable.

◆ SharedFIFO() [11/11]

StormByte::Buffer::SharedFIFO::SharedFIFO ( SharedFIFO && )
delete

Move constructor.

Deleted: the mutex is not movable.

◆ ~SharedFIFO()

virtual StormByte::Buffer::SharedFIFO::~SharedFIFO ( )
virtualnoexcept

Destroy the SharedFIFO.

Member Function Documentation

◆ Available()

virtual StormByte::ByteSize StormByte::Buffer::SharedFIFO::Available ( ) const
overridevirtualnoexcept

Bytes available from the current read position.

Returns
Unread byte count.

Reimplemented from StormByte::Buffer::FIFO.

◆ Clean()

void StormByte::Buffer::SharedFIFO::Clean ( )
overridevirtualnoexcept

Discard data from the start up to the read position.

See also
FIFO::Clean()

Reimplemented from StormByte::Buffer::FIFO.

◆ Clear()

virtual void StormByte::Buffer::SharedFIFO::Clear ( )
overridevirtualnoexcept

Clear stored bytes.

Does not clear closed or error flags.

See also
FIFO::Clear()

Reimplemented from StormByte::Buffer::FIFO.

◆ Close()

virtual void StormByte::Buffer::SharedFIFO::Close ( )
overridevirtualnoexcept

Close for further writes and notify waiters.

See also
FIFO::Close(), IsWritable()

Reimplemented from StormByte::Buffer::FIFO.

◆ Data()

virtual const StormByte::Safe::Binary & StormByte::Buffer::SharedFIFO::Data ( ) const
overridevirtualnoexcept

Access the internal storage.

Warning
Not safe under concurrent mutation without external exclusion.
Returns
Owned bytes.

Reimplemented from StormByte::Buffer::FIFO.

◆ Drop()

virtual bool StormByte::Buffer::SharedFIFO::Drop ( const StormByte::ByteSize & count)
overridevirtualnoexcept

Discard unread bytes and notify waiters.

Parameters
countBytes to drop.
Returns
False on failure.
See also
FIFO::Drop()

Reimplemented from StormByte::Buffer::FIFO.

◆ Empty()

virtual bool StormByte::Buffer::SharedFIFO::Empty ( ) const
overridevirtualnoexcept

Whether the underlying storage is empty.

Returns
Whether storage is empty.
Note
With a non-zero read position this may be false while Available() is zero.
See also
Size(), Available()

Reimplemented from StormByte::Buffer::FIFO.

◆ EoF()

virtual bool StormByte::Buffer::SharedFIFO::EoF ( ) const
overridevirtualnoexcept

End-of-stream condition.

Returns
Whether the FIFO is closed or in error and nothing unread remains.

Reimplemented from StormByte::Buffer::FIFO.

◆ HasError()

bool StormByte::Buffer::SharedFIFO::HasError ( ) const
noexcept

Whether the buffer is in a permanent error state.

Returns
Whether SetError() has been called.

◆ HexDump()

virtual StormByte::Safe::String StormByte::Buffer::SharedFIFO::HexDump ( const StormByte::ByteSize & columns = 0,
const StormByte::ByteSize & byte_limit = 0 ) const
overridevirtualnoexcept

Hexdump of unread contents.

Parameters
columnsBytes per line. 0 means the FIFO default.
byte_limitMaximum bytes to include. 0 means no limit.
Returns
Size, position and status, then hex/ASCII lines. No trailing newline.

Reimplemented from StormByte::Buffer::FIFO.

◆ IsReadable()

virtual bool StormByte::Buffer::SharedFIFO::IsReadable ( ) const
overridevirtualnoexcept

Whether the buffer can still be read.

Returns
False in a permanent error state.
See also
SetError(), IsWritable(), Available(), EoF()

Reimplemented from StormByte::Buffer::FIFO.

◆ IsWritable()

virtual bool StormByte::Buffer::SharedFIFO::IsWritable ( ) const
overridevirtualnoexcept

Whether the buffer accepts writes.

Returns
False if closed or in error.
See also
Close(), SetError(), IsReadable()

Reimplemented from StormByte::Buffer::FIFO.

◆ operator!=()

bool StormByte::Buffer::SharedFIFO::operator!= ( const SharedFIFO & other) const
inlinenoexcept

Compare two SharedFIFOs.

Parameters
otherOther SharedFIFO.
Returns
Whether the SharedFIFOs differ.

◆ operator=() [1/4]

SharedFIFO & StormByte::Buffer::SharedFIFO::operator= ( const FIFO & other)

Copy-assign from a plain FIFO.

Parameters
otherSource FIFO.
Returns
This SharedFIFO.

◆ operator=() [2/4]

SharedFIFO & StormByte::Buffer::SharedFIFO::operator= ( const SharedFIFO & )
delete

Copy assignment.

Deleted.

◆ operator=() [3/4]

SharedFIFO & StormByte::Buffer::SharedFIFO::operator= ( FIFO && other)
noexcept

Move-assign from a plain FIFO.

Parameters
otherSource FIFO.
Returns
This SharedFIFO.

◆ operator=() [4/4]

SharedFIFO & StormByte::Buffer::SharedFIFO::operator= ( SharedFIFO && )
delete

Move assignment.

Deleted: the mutex is not movable.

◆ operator==()

bool StormByte::Buffer::SharedFIFO::operator== ( const SharedFIFO & other) const
noexcept

Compare two SharedFIFOs.

Both mutexes are held.

Parameters
otherOther SharedFIFO.
Returns
Whether contents and state match.

◆ Seek()

virtual void StormByte::Buffer::SharedFIFO::Seek ( const std::ptrdiff_t & offset,
const Position & mode ) const
overridevirtualnoexcept

Move the logical read position and notify waiters.

Parameters
offsetOffset.
modeAbsolute or relative.

Clamped to [0, Size()].

See also
Read(), Position

Reimplemented from StormByte::Buffer::FIFO.

◆ SetError()

virtual void StormByte::Buffer::SharedFIFO::SetError ( )
overridevirtualnoexcept

Enter the permanent error state and notify waiters.

See also
FIFO::SetError(), IsReadable(), IsWritable()

Reimplemented from StormByte::Buffer::FIFO.

◆ Size()

virtual StormByte::ByteSize StormByte::Buffer::SharedFIFO::Size ( ) const
overridevirtualnoexcept

Total number of bytes stored.

Returns
Size in bytes.
See also
Empty(), Available()

Reimplemented from StormByte::Buffer::FIFO.


The documentation for this class was generated from the following file: