|
StormByte C++ Library: Buffer module 0.0.9999
StormByte-Buffer is a StormByte library module for handling buffers
|
Thread-safe FIFO built on top of FIFO. More...
#include <shared_fifo.hxx>


Public Member Functions | |
| SharedFIFO () noexcept=default | |
| Construct a SharedFIFO with optional initial capacity. | |
| SharedFIFO (const DataType &data) | |
| Construct a SharedFIFO with initial data. | |
| SharedFIFO (DataType &&data) noexcept | |
| Construct a SharedFIFO with initial data using move semantics. | |
| template<std::ranges::input_range R> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<R>>>) && requires(std::ranges::range_value_t<R> v) { static_cast<std::byte>(v); } && (!std::same_as<std::remove_cvref_t<R>, DataType>) | |
| SharedFIFO (const R &r) noexcept | |
| Construct FIFO from an input range. | |
| template<std::ranges::input_range Rr> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rr>>>) && requires(std::ranges::range_value_t<Rr> v) { static_cast<std::byte>(v); } | |
| SharedFIFO (Rr &&r) noexcept | |
| Construct FIFO from an rvalue range (moves when DataType rvalue). | |
| SharedFIFO (std::string_view sv) noexcept | |
| Construct FIFO from a string view (does not include terminating NUL). | |
| SharedFIFO (const FIFO &other) | |
| Construct a SharedFIFO by copying or moving from a FIFO. | |
| SharedFIFO (FIFO &&other) noexcept | |
| Construct a SharedFIFO by moving from a FIFO. | |
| SharedFIFO (const SharedFIFO &)=delete | |
| Copy constructors are deleted. | |
| SharedFIFO (SharedFIFO &&other) noexcept=default | |
| Move constructor. | |
| virtual | ~SharedFIFO () noexcept=default |
| Virtual destructor. | |
| SharedFIFO & | operator= (const FIFO &other) |
| Copy assignment from FIFO. | |
| SharedFIFO & | operator= (FIFO &&other) noexcept |
| Move assignment from FIFO. | |
| SharedFIFO & | operator= (const SharedFIFO &)=delete |
| Copy and move assignment operators are deleted. | |
| SharedFIFO & | operator= (SharedFIFO &&) noexcept |
| Move assignment operator. | |
| bool | operator== (const SharedFIFO &other) const noexcept |
| Equality comparison (thread-safe). | |
| bool | operator!= (const SharedFIFO &other) const noexcept |
| Inequality comparison. | |
| virtual std::size_t | AvailableBytes () const noexcept override |
| Get the number of bytes available for reading. | |
| void | Clean () noexcept override |
| Thread-safe clean of buffer data from start to read position. | |
| virtual void | Clear () noexcept override |
| Thread-safe clear of all buffer contents. | |
| virtual const DataType & | Data () const noexcept override |
| Access the internal data buffer. | |
| virtual void | Close () noexcept |
| Thread-safe close for further writes. | |
| virtual bool | Drop (const std::size_t &count) noexcept override |
| Thread-safe drop operation. | |
| virtual bool | Empty () const noexcept override |
| Check if the buffer is empty. | |
| virtual bool | EoF () const noexcept override |
| Check if the reader has reached end-of-file. | |
| bool | HasError () const noexcept |
| Check if the buffer is in an error state. | |
| virtual std::string | HexDump (const std::size_t &collumns=0, const std::size_t &byte_limit=0) const noexcept override |
| Produce a thread-safe hexdump of the buffer. | |
| virtual bool | IsReadable () const noexcept override |
| Check if the buffer is readable (not in error state). | |
| virtual bool | IsWritable () const noexcept override |
| Check if the buffer is writable (not closed and not in error state). | |
| virtual void | Seek (const std::ptrdiff_t &offset, const Position &mode) const noexcept override |
| Move the read position for non-destructive reads. | |
| virtual void | SetError () noexcept |
| Thread-safe error state setting. | |
| virtual std::size_t | Size () const noexcept override |
| Get the current number of bytes stored in the buffer. | |
Public Member Functions inherited from StormByte::Buffer::FIFO | |
| FIFO () noexcept=default | |
| Construct FIFO. | |
| FIFO (const DataType &data) noexcept | |
| Construct FIFO with initial data. | |
| FIFO (DataType &&data) noexcept | |
| Construct FIFO with initial data using move semantics. | |
| template<std::ranges::input_range R> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<R>>>) && requires(std::ranges::range_value_t<R> v) { static_cast<std::byte>(v); } && (!std::same_as<std::remove_cvref_t<R>, DataType>) | |
| FIFO (const R &r) noexcept | |
| Construct FIFO from an input range. | |
| template<std::ranges::input_range Rr> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rr>>>) && requires(std::ranges::range_value_t<Rr> v) { static_cast<std::byte>(v); } | |
| FIFO (Rr &&r) noexcept | |
| Construct FIFO from an rvalue range (moves when DataType rvalue). | |
| FIFO (std::string_view sv) noexcept | |
| Construct FIFO from a string view (does not include terminating NUL). | |
| FIFO (const char *s) noexcept | |
| Construct FIFO from a C string pointer (null-terminated). | |
| FIFO (const FIFO &other) noexcept | |
| Copy construct, preserving buffer state and initial capacity. | |
| FIFO (FIFO &&other) noexcept | |
| Move construct, preserving buffer state and initial capacity. | |
| virtual | ~FIFO () noexcept=default |
| Virtual destructor. | |
| FIFO & | operator= (const FIFO &other) |
| Copy assign, preserving buffer state and initial capacity. | |
| FIFO & | operator= (FIFO &&other) noexcept |
| Move assign, preserving buffer state and initial capacity. | |
| bool | operator== (const FIFO &other) const noexcept |
| Equality comparison. | |
| bool | operator!= (const FIFO &other) const noexcept |
| Inequality comparison. | |
| bool | Extract (const std::size_t &count, DataType &outBuffer) noexcept override |
| Destructive read that removes data from the buffer into an existing vector. | |
| bool | Extract (const std::size_t &count, WriteOnly &outBuffer) noexcept override |
| Destructive read that removes data from the buffer into a FIFO. | |
| void | ExtractUntilEoF (DataType &outBuffer) noexcept override |
| Read all bytes until end-of-file into an existing buffer. | |
| void | ExtractUntilEoF (WriteOnly &outBuffer) noexcept override |
| Read all bytes until end-of-file into a WriteOnly buffer. | |
| bool | Peek (const std::size_t &count, DataType &outBuffer) const noexcept override |
| Non-destructive peek at buffer data without advancing read position. | |
| bool | Peek (const std::size_t &count, WriteOnly &outBuffer) const noexcept override |
| Non-destructive peek at buffer data without advancing read position. | |
| bool | Read (const std::size_t &count, DataType &outBuffer) const noexcept override |
| Non destructive read that removes data from the buffer into an existing vector. | |
| bool | Read (const std::size_t &count, WriteOnly &outBuffer) const noexcept override |
| Destructive read that removes data from the buffer into a vector. | |
| void | ReadUntilEoF (DataType &outBuffer) const noexcept override |
| Read all bytes until end-of-file into an existing buffer. | |
| void | ReadUntilEoF (WriteOnly &outBuffer) const noexcept override |
| Read all bytes until end-of-file into a WriteOnly buffer. | |
| bool | Write (const std::size_t &count, const DataType &data) noexcept override |
| Write bytes from a vector to the buffer. | |
| bool | Write (const std::size_t &count, DataType &&data) noexcept override |
| Move bytes from a vector to the buffer. | |
| bool | Write (const std::size_t &count, const ReadOnly &data) noexcept override |
| Write bytes from a vector to the buffer. | |
| bool | Write (const std::size_t &count, ReadOnly &&data) noexcept override |
| Move bytes from a vector to the buffer. | |
| virtual bool | Extract (const std::size_t &count, DataType &outBuffer) noexcept=0 |
| bool | Extract (DataType &outBuffer) noexcept |
| virtual bool | Extract (const std::size_t &count, WriteOnly &outBuffer) noexcept=0 |
| bool | Extract (WriteOnly &outBuffer) noexcept |
| virtual bool | Read (const std::size_t &count, DataType &outBuffer) const noexcept=0 |
| bool | Read (DataType &outBuffer) const noexcept |
| virtual bool | Read (const std::size_t &count, WriteOnly &outBuffer) const noexcept=0 |
| bool | Read (WriteOnly &outBuffer) const noexcept |
| virtual bool | Write (const std::size_t &count, const DataType &data) noexcept=0 |
| bool | Write (std::string_view sv) noexcept |
| bool | Write (const char *s) noexcept |
| bool | Write (const std::size_t &count, std::string_view sv) noexcept |
| bool | Write (const std::size_t &count, const char *s) noexcept |
| template<std::size_t N> | |
| bool | Write (const char(&s)[N]) noexcept |
| template<std::ranges::input_range R> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<R>>>) && requires(std::ranges::range_value_t<R> v) { static_cast<std::byte>(v); } | |
| bool | Write (const R &r) noexcept |
| template<std::ranges::input_range Rw> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rw>>>) && requires(std::ranges::range_value_t<Rw> v) { static_cast<std::byte>(v); } | |
| bool | Write (const std::size_t &count, const Rw &r) noexcept |
| template<std::ranges::input_range Rrw> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rrw>>>) && requires(std::ranges::range_value_t<Rrw> v) { static_cast<std::byte>(v); } | |
| bool | Write (const std::size_t &count, Rrw &&r) noexcept |
| template<std::ranges::input_range Rr> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rr>>>) && requires(std::ranges::range_value_t<Rr> v) { static_cast<std::byte>(v); } | |
| bool | Write (Rr &&r) noexcept |
| template<std::input_iterator I, std::sentinel_for< I > S> requires (!std::is_class_v<std::remove_cv_t<std::iter_value_t<I>>>) && requires(std::iter_value_t<I> v) { static_cast<std::byte>(v); } | |
| bool | Write (I first, S last) noexcept |
| template<std::input_iterator I2, std::sentinel_for< I2 > S2> requires (!std::is_class_v<std::remove_cv_t<std::iter_value_t<I2>>>) && requires(std::iter_value_t<I2> v) { static_cast<std::byte>(v); } | |
| bool | Write (const std::size_t &count, I2 first, S2 last) noexcept |
| virtual bool | Write (const std::size_t &count, DataType &&data) noexcept=0 |
| virtual bool | Write (const std::size_t &count, const ReadOnly &data) noexcept=0 |
| bool | Write (const ReadOnly &data) noexcept |
| virtual bool | Write (const std::size_t &count, ReadOnly &&data) noexcept=0 |
| bool | Write (ReadOnly &&data) noexcept |
Public Member Functions inherited from StormByte::Buffer::ReadWrite | |
| ReadWrite () noexcept | |
| Construct ReadWrite. | |
| ReadWrite (const DataType &data) noexcept | |
| Construct ReadWrite. | |
| ReadWrite (DataType &&data) noexcept | |
| Construct ReadWrite with initial data using move semantics. | |
| ReadWrite (const ReadWrite &other) noexcept=default | |
| Copy construct deleted. | |
| ReadWrite (ReadWrite &&other) noexcept=default | |
| Move construct deleted. | |
| virtual | ~ReadWrite () noexcept=default |
| Virtual destructor. | |
| ReadWrite & | operator= (const ReadWrite &other)=default |
| Copy assign deleted. | |
| ReadWrite & | operator= (ReadWrite &&other) noexcept=default |
| Move assign deleted. | |
Public Member Functions inherited from StormByte::Buffer::ReadOnly | |
| ReadOnly () noexcept | |
| Construct ReadOnly. | |
| ReadOnly (const DataType &data) noexcept | |
| Construct ReadOnly. | |
| ReadOnly (DataType &&data) noexcept | |
| Construct ReadOnly with initial data using move semantics. | |
| ReadOnly (const ReadOnly &) noexcept=default | |
| Copy construct deleted. | |
| ReadOnly (ReadOnly &&) noexcept=default | |
| Move construct deleted. | |
| virtual | ~ReadOnly () noexcept=default |
| Virtual destructor. | |
| ReadOnly & | operator= (const ReadOnly &)=default |
| Copy assign deleted. | |
| ReadOnly & | operator= (ReadOnly &&) noexcept=default |
| Move assign deleted. | |
| bool | Extract (DataType &outBuffer) noexcept |
| Destructive read that removes all data from the buffer into an existing vector. | |
| bool | Extract (WriteOnly &outBuffer) noexcept |
| Destructive read that removes all data from the buffer into a FIFO. | |
| bool | Read (DataType &outBuffer) const noexcept |
| Read bytes into an existing buffer. | |
| bool | Read (WriteOnly &outBuffer) const noexcept |
| Read bytes into a WriteOnly buffer. | |
Public Member Functions inherited from StormByte::Buffer::Generic | |
| Generic () noexcept=default | |
| Construct Generic. | |
| Generic (const DataType &data) noexcept | |
| Construct Generic. | |
| Generic (DataType &&data) noexcept | |
| Construct Generic with initial data using move semantics. | |
| Generic (const Generic &) noexcept=default | |
| Copy construct deleted. | |
| Generic (Generic &&) noexcept=default | |
| Move construct deleted. | |
| virtual | ~Generic () noexcept=0 |
| Virtual destructor. | |
| Generic & | operator= (const Generic &other)=default |
| Copy assign deleted. | |
| Generic & | operator= (Generic &&) noexcept=default |
| Move assign deleted. | |
Public Member Functions inherited from StormByte::Buffer::WriteOnly | |
| WriteOnly () noexcept | |
| Construct WriteOnly. | |
| WriteOnly (const DataType &data) noexcept | |
| Construct WriteOnly. | |
| WriteOnly (DataType &&data) noexcept | |
| Construct WriteOnly with initial data using move semantics. | |
| WriteOnly (const WriteOnly &)=default | |
| Copy construct deleted. | |
| WriteOnly (WriteOnly &&) noexcept=default | |
| Move construct deleted. | |
| virtual | ~WriteOnly () noexcept=default |
| Virtual destructor. | |
| WriteOnly & | operator= (const WriteOnly &)=default |
| Copy assign deleted. | |
| WriteOnly & | operator= (WriteOnly &&) noexcept=default |
| Move assign deleted. | |
| bool | Write (std::string_view sv) noexcept |
| Write from a string view (does not include terminating NUL). | |
| bool | Write (const char *s) noexcept |
Write from a C string pointer (null-terminated). Uses std::string_view. | |
| bool | Write (const std::size_t &count, std::string_view sv) noexcept |
Write up-to count bytes from a string view (0 => all available). | |
| bool | Write (const std::size_t &count, const char *s) noexcept |
Write up-to count bytes from a C string pointer (null-terminated). | |
| template<std::size_t N> | |
| bool | Write (const char(&s)[N]) noexcept |
| Write from a string literal (array) and avoid copying the trailing NUL. | |
| template<std::ranges::input_range R> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<R>>>) && requires(std::ranges::range_value_t<R> v) { static_cast<std::byte>(v); } | |
| bool | Write (const R &r) noexcept |
| Write all elements from an input range to the buffer. | |
| template<std::ranges::input_range Rw> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rw>>>) && requires(std::ranges::range_value_t<Rw> v) { static_cast<std::byte>(v); } | |
| bool | Write (const std::size_t &count, const Rw &r) noexcept |
Write up-to count elements from an input range. | |
| template<std::ranges::input_range Rrw> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rrw>>>) && requires(std::ranges::range_value_t<Rrw> v) { static_cast<std::byte>(v); } | |
| bool | Write (const std::size_t &count, Rrw &&r) noexcept |
Write up-to count elements from an rvalue range. | |
| template<std::ranges::input_range Rr> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Rr>>>) && requires(std::ranges::range_value_t<Rr> v) { static_cast<std::byte>(v); } | |
| bool | Write (Rr &&r) noexcept |
| Write from an rvalue input range. | |
| template<std::input_iterator I, std::sentinel_for< I > S> requires (!std::is_class_v<std::remove_cv_t<std::iter_value_t<I>>>) && requires(std::iter_value_t<I> v) { static_cast<std::byte>(v); } | |
| bool | Write (I first, S last) noexcept |
Write from iterator pair whose value_type is convertible to std::byte. | |
| template<std::input_iterator I2, std::sentinel_for< I2 > S2> requires (!std::is_class_v<std::remove_cv_t<std::iter_value_t<I2>>>) && requires(std::iter_value_t<I2> v) { static_cast<std::byte>(v); } | |
| bool | Write (const std::size_t &count, I2 first, S2 last) noexcept |
Write up-to count bytes from an iterator pair (0 => all available). | |
| bool | Write (const ReadOnly &data) noexcept |
| Write bytes from a vector to the buffer. | |
| bool | Write (ReadOnly &&data) noexcept |
| Move bytes from a vector to the buffer. | |
Protected Attributes | |
| bool | m_closed {false} |
| Whether the SharedFIFO is closed for further writes. | |
| bool | m_error {false} |
| Whether the SharedFIFO is in an error state. | |
| std::string | m_error_message |
| Optional error message associated with the error state. | |
Protected Attributes inherited from StormByte::Buffer::FIFO | |
| std::size_t | m_position_offset {0} |
| Current read position for read operations. | |
Protected Attributes inherited from StormByte::Buffer::Generic | |
| DataType | m_buffer |
| Internal buffer storage. | |
Additional Inherited Members | |
Protected Types inherited from StormByte::Buffer::FIFO | |
| enum class | Operation { Extract , Read , Peek } |
| Enumeration of read operation types. More... | |
Protected Member Functions inherited from StormByte::Buffer::FIFO | |
| virtual void | ReadUntilEoFInternal (DataType &outBuffer, const Operation &flag) noexcept |
| Internal helper for reading until end-of-file. | |
| virtual void | ReadUntilEoFInternal (WriteOnly &outBuffer, const Operation &flag) noexcept |
| Internal helper for reading until end-of-file. | |
| virtual bool | WriteInternal (const std::size_t &count, const ReadOnly &src) noexcept |
| Internal helper for write operations. | |
| virtual bool | WriteInternal (const std::size_t &count, ReadOnly &&src) noexcept |
| Internal helper for write operations. | |
Static Protected Member Functions inherited from StormByte::Buffer::FIFO | |
| static std::string | FormatHexLines (std::span< const std::byte > &data, std::size_t start_offset, std::size_t collumns) noexcept |
| Produce a hexdump of the given data span. | |
Static Protected Member Functions inherited from StormByte::Buffer::Generic | |
| template<std::ranges::input_range Src> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Src>>>) && requires(std::ranges::range_value_t<Src> v) { static_cast<std::byte>(v); } | |
| static DataType | DataConvert (const Src &src) noexcept |
Convert various source types into the library DataType. | |
|
template<std::ranges::input_range Src> requires (!std::is_class_v<std::remove_cv_t<std::ranges::range_value_t<Src>>>) && requires(std::ranges::range_value_t<Src> v) { static_cast<std::byte>(v); } | |
| static DataType | DataConvert (Src &&src) noexcept |
| static DataType | DataConvert (std::string_view sv) noexcept |
Convert a std::string_view to DataType. | |
| static DataType | DataConvert (const char *s) noexcept |
Convert a null-terminated C string to DataType. | |
Thread-safe FIFO built on top of FIFO.
count == 0, it returns immediately with all bytes available from the current read position.count bytes exist in the buffer (destructive), or until closed. If count == 0, it returns immediately with all available data and clears the buffer.
|
defaultnoexcept |
Construct a SharedFIFO with optional initial capacity.
| capacity | Initial number of bytes to allocate in the buffer. Behaves like FIFO and may grow as needed. |
|
inline |
Construct a SharedFIFO with initial data.
| data | Initial byte vector to populate the FIFO. |
|
inlinenoexcept |
Construct a SharedFIFO with initial data using move semantics.
| data | Initial byte vector to move into the FIFO. |
|
inlinenoexcept |
Construct FIFO from an input range.
| R | Input range whose elements are convertible to std::byte. |
| r | The input range to copy from. |
DataType to avoid ambiguity with the existing DataType overloads.
|
inlinenoexcept |
Construct FIFO from an rvalue range (moves when DataType rvalue).
| Rr | Input range type; if it's DataType this will be moved into the internal buffer, otherwise elements are converted. |
|
inline |
Construct a SharedFIFO by copying or moving from a FIFO.
| other | Source FIFO to copy or move from. |
|
inlinenoexcept |
Construct a SharedFIFO by moving from a FIFO.
| other | Source FIFO to move from; left empty after move. |
|
delete |
Copy constructors are deleted.
SharedFIFO contains synchronization primitives and shared internal state (mutex, condition variable, etc.). Copying or moving instances would require careful transfer or duplication of these primitives which is unsafe and error-prone. To avoid accidental misuse and subtle concurrency bugs these constructors are explicitly deleted. If duplication of the stored bytes is required, copy the data via the base FIFO and construct a new SharedFIFO.
|
defaultnoexcept |
Move constructor.
| other | Source SharedFIFO to move from; left in a valid but |
|
overridevirtualnoexcept |
Get the number of bytes available for reading.
Reimplemented from StormByte::Buffer::FIFO.
|
overridevirtualnoexcept |
Thread-safe clean of buffer data from start to read position.
Reimplemented from StormByte::Buffer::FIFO.
|
overridevirtualnoexcept |
Thread-safe clear of all buffer contents.
Reimplemented from StormByte::Buffer::FIFO.
|
virtualnoexcept |
Thread-safe close for further writes.
Marks buffer as closed, notifies all waiting threads. Subsequent writes are ignored. The buffer remains readable until all data is consumed.
|
inlineoverridevirtualnoexcept |
Access the internal data buffer.
Reimplemented from StormByte::Buffer::FIFO.
|
overridevirtualnoexcept |
Thread-safe drop operation.
Notifies waiting readers after dropping.
Reimplemented from StormByte::Buffer::FIFO.
|
overridevirtualnoexcept |
Check if the buffer is empty.
Reimplemented from StormByte::Buffer::FIFO.
|
overridevirtualnoexcept |
Check if the reader has reached end-of-file.
Returns true when the buffer has been closed or set to error and there are no available bytes remaining.
Reimplemented from StormByte::Buffer::FIFO.
|
noexcept |
Check if the buffer is in an error state.
|
overridevirtualnoexcept |
Produce a thread-safe hexdump of the buffer.
| collumns | Number of columns per line (0 -> default 16). |
| byte_limit | Maximum number of bytes to include (0 -> no limit). |
Acquires the internal mutex for reading so the dump represents a consistent snapshot. The returned string begins with a status line of the form Status: opened|closed, ready|error
followed by the same output produced by FIFO::HexDump(). Example output:
Reimplemented from StormByte::Buffer::FIFO.
|
inlineoverridevirtualnoexcept |
Check if the buffer is readable (not in error state).
A buffer becomes unreadable when SetError() is called. Use in combination with AvailableBytes() to check if there is data pending to read.
Reimplemented from StormByte::Buffer::FIFO.
|
inlineoverridevirtualnoexcept |
Check if the buffer is writable (not closed and not in error state).
A buffer becomes unwritable when Close() or SetError() is called.
Reimplemented from StormByte::Buffer::FIFO.
|
inlinenoexcept |
Inequality comparison.
Negates operator==.
| SharedFIFO & StormByte::Buffer::SharedFIFO::operator= | ( | const FIFO & | other | ) |
Copy assignment from FIFO.
| other | Source FIFO to copy from. |
|
delete |
Copy and move assignment operators are deleted.
Assigning one SharedFIFO to another would imply transferring or duplicating ownership of internal synchronization primitives (mutex/condition variable) and internal buffer state. This is unsafe and therefore these operators are explicitly deleted. Use explicit data-copy via FIFO if needed.
|
noexcept |
Move assignment from FIFO.
| other | Source FIFO to move from. |
|
noexcept |
Move assignment operator.
| other | Source SharedFIFO to move from; left in a valid but unspecified state. |
|
noexcept |
Equality comparison (thread-safe).
Compares this SharedFIFO with other while holding both internal mutexes. The comparison delegates to the base FIFO::operator==, so equality semantics follow the FIFO implementation.
|
overridevirtualnoexcept |
Move the read position for non-destructive reads.
| position | The offset value to apply. |
| mode | Unused for base class; included for API consistency. |
Changes where subsequent Read() operations will start reading from. Position is clamped to [0, Size()]. Does not affect stored data.
Reimplemented from StormByte::Buffer::FIFO.
|
virtualnoexcept |
Thread-safe error state setting.
Marks buffer as erroneous (unreadable and unwritable), notifies all waiting threads. Subsequent writes are ignored and reads will fail.
|
overridevirtualnoexcept |
Get the current number of bytes stored in the buffer.
Reimplemented from StormByte::Buffer::FIFO.