Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::io::ByteBuilder Class Referencefinal

Non-thread-safe byte buffer class. More...

#include <ByteBuilder.h>

Inheritance diagram for sese::io::ByteBuilder:
sese::io::AbstractByteBuffer sese::io::Stream sese::io::PeekableStream sese::io::InputStream sese::io::OutputStream

Public Types

using Ptr = std::unique_ptr<ByteBuilder>
 
- Public Types inherited from sese::io::Stream
typedef std::shared_ptr< StreamPtr
 
- Public Types inherited from sese::io::InputStream
typedef std::shared_ptr< InputStreamPtr
 
- Public Types inherited from sese::io::OutputStream
typedef std::shared_ptr< OutputStreamPtr
 
- Public Types inherited from sese::io::PeekableStream
typedef std::shared_ptr< PeekableStreamPtr
 

Public Member Functions

 ByteBuilder (size_t baseSize=STREAM_BYTE_STREAM_SIZE_FACTOR, size_t factor=STREAM_BYTE_STREAM_SIZE_FACTOR) noexcept
 
- Public Member Functions inherited from sese::io::AbstractByteBuffer
 AbstractByteBuffer (size_t base_size=STREAM_BYTE_STREAM_SIZE_FACTOR, size_t factor=STREAM_BYTE_STREAM_SIZE_FACTOR)
 
 AbstractByteBuffer (const AbstractByteBuffer &abstract_byte_buffer) noexcept
 Copy.
 
 AbstractByteBuffer (AbstractByteBuffer &&abstract_byte_buffer) noexcept
 Mobile semantics.
 
 ~AbstractByteBuffer () override
 
virtual void resetPos ()
 Reset the read position.
 
virtual bool eof ()
 Whether there is readable data.
 
virtual size_t getLength () const
 
virtual size_t getCapacity () const
 
virtual size_t getReadableSize () const
 
virtual size_t freeCapacity ()
 
virtual void swap (AbstractByteBuffer &other) noexcept
 
int64_t read (void *buffer, size_t len) override
 
int64_t write (const void *buffer, size_t len) override
 
int64_t peek (void *buffer, size_t len) override
 
int64_t trunc (size_t need_read) override
 
- Public Member Functions inherited from sese::io::InputStream
virtual ~InputStream () noexcept=default
 
- Public Member Functions inherited from sese::io::OutputStream
virtual ~OutputStream () noexcept=default
 
int64_t write (const std::string_view &buffer)
 
int64_t write (const text::StringView &buffer)
 
template<typename T >
int64_t write (std::vector< T > &buffer)
 
template<typename T , size_t N>
int64_t write (std::array< T, N > &buffer)
 
- Public Member Functions inherited from sese::io::PeekableStream
virtual ~PeekableStream ()=default
 

Detailed Description

Non-thread-safe byte buffer class.

Member Typedef Documentation

◆ Ptr

using sese::io::ByteBuilder::Ptr = std::unique_ptr<ByteBuilder>

Constructor & Destructor Documentation

◆ ByteBuilder()

sese::io::ByteBuilder::ByteBuilder ( size_t baseSize = STREAM_BYTE_STREAM_SIZE_FACTOR,
size_t factor = STREAM_BYTE_STREAM_SIZE_FACTOR )
inlinenoexcept

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