Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::io::ByteBuilder类 参考final

线程不安全的字节缓冲类 更多...

#include <ByteBuilder.h>

类 sese::io::ByteBuilder 继承关系图:
sese::io::AbstractByteBuffer sese::io::Stream sese::io::PeekableStream sese::io::InputStream sese::io::OutputStream

Public 类型

using Ptr = std::unique_ptr<ByteBuilder>
 
- Public 类型 继承自 sese::io::Stream
typedef std::shared_ptr< StreamPtr
 
- Public 类型 继承自 sese::io::InputStream
typedef std::shared_ptr< InputStreamPtr
 
- Public 类型 继承自 sese::io::OutputStream
typedef std::shared_ptr< OutputStreamPtr
 
- Public 类型 继承自 sese::io::PeekableStream
typedef std::shared_ptr< PeekableStreamPtr
 

Public 成员函数

 ByteBuilder (size_t baseSize=STREAM_BYTE_STREAM_SIZE_FACTOR, size_t factor=STREAM_BYTE_STREAM_SIZE_FACTOR) noexcept
 
- Public 成员函数 继承自 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
 拷贝
 
 AbstractByteBuffer (AbstractByteBuffer &&abstract_byte_buffer) noexcept
 移动语义
 
 ~AbstractByteBuffer () override
 析构
 
virtual void resetPos ()
 重置读取位置
 
virtual bool eof ()
 是否有可读数据
 
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 成员函数 继承自 sese::io::InputStream
virtual ~InputStream () noexcept=default
 
- Public 成员函数 继承自 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 成员函数 继承自 sese::io::PeekableStream
virtual ~PeekableStream ()=default
 

详细描述

线程不安全的字节缓冲类

成员类型定义说明

◆ Ptr

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

构造及析构函数说明

◆ ByteBuilder()

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

该类的文档由以下文件生成: