|
StormByte C++ Library: Buffer module 1.2.0
StormByte-Buffer is the buffer module of the StormByte C++ suite.
|
Pure interface combining ReadOnly and WriteOnly. More...
#include <StormByte/buffer/generic.hxx>


Public Member Functions | |
Constructors / destructor / assignment | |
| ReadWrite () noexcept | |
| Default construct. | |
| ReadWrite (const ReadWrite &other) noexcept=default | |
| Copy construct. | |
| ReadWrite (ReadWrite &&other) noexcept=default | |
| Move construct. | |
| virtual | ~ReadWrite () noexcept |
| Virtual destructor. | |
| ReadWrite & | operator= (const ReadWrite &other)=default |
| Copy assign. | |
| ReadWrite & | operator= (ReadWrite &&other) noexcept=default |
| Move assign. | |
Public Member Functions inherited from StormByte::Buffer::ReadOnly | |
| ReadOnly () noexcept | |
| Default construct. | |
| ReadOnly (const ReadOnly &) noexcept=default | |
| Copy construct. | |
| ReadOnly (ReadOnly &&) noexcept=default | |
| Move construct. | |
| virtual | ~ReadOnly () noexcept |
| Virtual destructor. | |
| ReadOnly & | operator= (const ReadOnly &)=default |
| Copy assign. | |
| ReadOnly & | operator= (ReadOnly &&) noexcept=default |
| Move assign. | |
| virtual std::size_t | AvailableBytes () const noexcept=0 |
| Bytes available from the current read position. | |
| virtual const DataType & | Data () const noexcept=0 |
| Access a view of the internal storage (implementation-defined). | |
| virtual bool | Empty () const noexcept=0 |
| Whether the buffer holds no stored bytes. | |
| virtual bool | EoF () const noexcept=0 |
| End-of-stream condition. | |
| virtual bool | IsReadable () const noexcept=0 |
| Whether the buffer can still be read. | |
| virtual std::size_t | Size () const noexcept=0 |
| Total number of bytes stored. | |
| virtual void | Clean () noexcept=0 |
| Discard data from the start up to the current read position. | |
| virtual void | Clear () noexcept=0 |
| Clear all buffer contents and reset logical positions. | |
| virtual bool | Drop (const std::size_t &count) noexcept=0 |
Discard count unread bytes. | |
| virtual void | Seek (const std::ptrdiff_t &offset, const Position &mode) const noexcept=0 |
| Move the logical read position for non-destructive reads. | |
| virtual bool | Extract (const std::size_t &count, DataType &outBuffer) noexcept=0 |
| Extract bytes into a DataType. | |
| bool | Extract (DataType &outBuffer) noexcept |
| Extract all available bytes into a DataType. | |
| virtual bool | Extract (const std::size_t &count, WriteOnly &outBuffer) noexcept=0 |
| Extract bytes into a WriteOnly. | |
| bool | Extract (WriteOnly &outBuffer) noexcept |
| Extract all available bytes into a WriteOnly. | |
| virtual void | ExtractUntilEoF (DataType &outBuffer) noexcept=0 |
| Extract until EoF into a DataType. | |
| virtual void | ExtractUntilEoF (WriteOnly &outBuffer) noexcept=0 |
| Extract until EoF into a WriteOnly. | |
| virtual bool | Peek (const std::size_t &count, DataType &outBuffer) const noexcept=0 |
| Peek into a DataType without advancing the read position. | |
| virtual bool | Peek (const std::size_t &count, WriteOnly &outBuffer) const noexcept=0 |
| Peek into a WriteOnly without advancing the read position. | |
| virtual bool | Read (const std::size_t &count, DataType &outBuffer) const noexcept=0 |
| Read into a DataType. | |
| bool | Read (DataType &outBuffer) const noexcept |
| Read all available bytes into a DataType. | |
| virtual bool | Read (const std::size_t &count, WriteOnly &outBuffer) const noexcept=0 |
| Read into a WriteOnly. | |
| bool | Read (WriteOnly &outBuffer) const noexcept |
| Read all available bytes into a WriteOnly. | |
| virtual void | ReadUntilEoF (DataType &outBuffer) const noexcept=0 |
| Read until EoF into a DataType. | |
| virtual void | ReadUntilEoF (WriteOnly &outBuffer) const noexcept=0 |
| Read until EoF into a WriteOnly. | |
Public Member Functions inherited from StormByte::Buffer::Generic | |
| Generic () noexcept=default | |
| Default construct. | |
| Generic (const Generic &) noexcept=default | |
| Copy construct. | |
| Generic (Generic &&) noexcept=default | |
| Move construct. | |
| virtual | ~Generic () noexcept=0 |
| Pure virtual destructor (keeps the class abstract). | |
| Generic & | operator= (const Generic &other)=default |
| Copy assign. | |
| Generic & | operator= (Generic &&) noexcept=default |
| Move assign. | |
Public Member Functions inherited from StormByte::Buffer::WriteOnly | |
| WriteOnly () noexcept | |
| Default construct. | |
| WriteOnly (const WriteOnly &)=default | |
| Copy construct. | |
| WriteOnly (WriteOnly &&) noexcept=default | |
| Move construct. | |
| virtual | ~WriteOnly () noexcept |
| Virtual destructor. | |
| WriteOnly & | operator= (const WriteOnly &)=default |
| Copy assign. | |
| WriteOnly & | operator= (WriteOnly &&) noexcept=default |
| Move assign. | |
| virtual bool | IsWritable () const noexcept=0 |
| Whether the buffer accepts writes. | |
| virtual void | Close () noexcept=0 |
| Mark the buffer closed for further writes. | |
| virtual void | SetError () noexcept=0 |
| Enter a permanent error state (unreadable and unwritable). | |
| virtual bool | Write (const std::size_t &count, const DataType &data) noexcept=0 |
| Append bytes from a DataType (copy). | |
| virtual bool | Write (const std::size_t &count, DataType &&data) noexcept=0 |
| Append bytes from a DataType (move). | |
| virtual bool | Write (const std::size_t &count, const ReadOnly &data) noexcept=0 |
| Append bytes from a ReadOnly (copy path). | |
| virtual bool | Write (const std::size_t &count, ReadOnly &&data) noexcept=0 |
| Append bytes from a ReadOnly (move / extract path). | |
| 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 (move path). | |
| bool | Write (std::string_view sv) noexcept |
| Write a string view (no trailing NUL). | |
| bool | Write (const char *s) noexcept |
| Write a null-terminated C string. | |
| bool | Write (const std::size_t &count, std::string_view sv) noexcept |
Write up to count characters from a string view. | |
| bool | Write (const std::size_t &count, const char *s) noexcept |
Write up to count characters from 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> | |
| bool | Write (const R &r) noexcept |
| Write all elements from an input range. | |
| template<Type::ByteInputRange Rw> | |
| bool | Write (const std::size_t &count, const Rw &r) noexcept |
Write up to count elements from an input range. | |
| template<Type::ByteInputRange Rrw> | |
| bool | Write (const std::size_t &count, Rrw &&r) noexcept |
Write up to count elements from an rvalue range. | |
| template<Type::ByteInputRange Rr> | |
| bool | Write (Rr &&r) noexcept |
| Write all elements from an rvalue range. | |
| template<Type::ByteInputIterator I, typename S > requires Type::SentinelFor<S, I> | |
| 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> | |
| bool | Write (const std::size_t &count, I2 first, S2 last) noexcept |
Write up to count elements from an iterator pair. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from StormByte::Buffer::Generic | |
| template<Type::ByteInputRange Src> | |
| static DataType | DataConvert (const Src &src) noexcept |
| Convert an lvalue input range to DataType. | |
| template<Type::ByteInputRange Src> | |
| static DataType | DataConvert (Src &&src) noexcept |
| Convert an rvalue input range to DataType (moves when already DataType). | |
| static DataType | DataConvert (std::string_view sv) noexcept |
| Convert a string view to DataType (no trailing NUL). | |
| static DataType | DataConvert (const char *s) noexcept |
| Convert a null-terminated C string to DataType. | |
Pure interface combining ReadOnly and WriteOnly.
Concrete bidirectional buffers (FIFO, Ring, …) implement this.
|
inlinenoexcept |
Default construct.
|
defaultnoexcept |
Copy construct.
|
defaultnoexcept |
Move construct.
|
virtualnoexcept |
Virtual destructor.
Move assign.