|
| | Ring () noexcept |
| | Construct an empty Ring.
|
| | Ring (const StormByte::Safe::Binary &data) noexcept |
| | Copy initial data into deque storage.
|
| | Ring (StormByte::Safe::Binary &&data) noexcept |
| | Move initial data into deque storage.
|
template<Type::ByteInputRange R>
requires (!Type::SameAs<R, StormByte::Safe::Binary>) |
| | Ring (const R &r) noexcept |
| | Convert an input range and delegate construction to the provider.
|
| template<Type::ByteInputRange Rr> |
| | Ring (Rr &&r) noexcept |
| | Convert an rvalue range and delegate construction to the provider.
|
| | Ring (std::string_view sv) noexcept |
| | Construct from a string view.
|
| | Ring (const char *s) noexcept |
| | Construct from a C string.
|
| | Ring (const Ring &)=delete |
| | Copy constructor.
|
| | Ring (Ring &&other) noexcept |
| | Take a Ring.
|
| virtual | ~Ring () noexcept |
| | Destroy the Ring.
|
| Ring & | operator= (const Ring &)=delete |
| | Copy assignment.
|
| Ring & | operator= (Ring &&other) noexcept |
| | Move-assign a Ring.
|
| bool | operator== (const Ring &other) const noexcept |
| | Compare contents and lifecycle state.
|
| bool | operator!= (const Ring &other) const noexcept |
| | Compare two Rings.
|
| StormByte::ByteSize | Available () const noexcept override |
| | Bytes available from the current read position.
|
| const StormByte::Safe::Binary & | Data () const noexcept override |
| | Snapshot of stored data.
|
| bool | Empty () const noexcept override |
| | Whether the underlying storage is empty.
|
| bool | EoF () const noexcept override |
| | End-of-stream condition.
|
| bool | HasError () const noexcept |
| | Whether SetError() has been called.
|
| bool | IsReadable () const noexcept override |
| | Whether the buffer can still be read.
|
| bool | IsWritable () const noexcept override |
| | Whether the buffer accepts writes.
|
| StormByte::ByteSize | Size () const noexcept override |
| | Total number of bytes stored.
|
| void | Clean () noexcept override |
| | Discard data from the start up to the current read position.
|
| void | Clear () noexcept override |
| | Clear stored bytes and reset the read position.
|
| void | Close () noexcept override |
| | Close the buffer for further writes and notify waiters.
|
| bool | Drop (const StormByte::ByteSize &count) noexcept override |
| | Discard unread bytes.
|
| void | Seek (const std::ptrdiff_t &offset, const Position &mode) const noexcept override |
| | Move the logical read position.
|
| void | SetError () noexcept override |
| | Enter the permanent error state and notify waiters.
|
| StormByte::Safe::String | HexDump (const StormByte::ByteSize &columns=16, const StormByte::ByteSize &byte_limit=0) const noexcept |
| | Hexdump of unread contents from the current read position.
|
| 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 | 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 | 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 | 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.
|
| | 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.
|
| | 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.
|
| | 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.
|
| | 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.
|
Highly concurrent thread-safe ring buffer.
Backed by StormByte::Safe::Deque of std::byte with a logical read position. Uses StormByte::Safe::SharedMutex so several readers can proceed while writers and destructive operations stay exclusive. Blocked readers wait on a StormByte::Safe::ConditionVariableAny.
Fully thread-safe for concurrent producers and consumers. Pipeline intermediates use a private SPSC ring; this type is the public many-to-many ring.
Close() stops further writes; remaining data can still be drained. SetError() makes the buffer permanently unreadable and unwritable and wakes waiters.
Construction from bytes, a range, a string view or a C string is explicit.
- See also
- Producer, Consumer, ReadWrite, SharedFIFO