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

固定大小的字节缓冲区类 更多...

#include <AbstractFixedBuffer.h>

类 sese::io::AbstractFixedBuffer 继承关系图:
sese::io::Stream sese::io::PeekableStream sese::io::InputStream sese::io::OutputStream sese::io::FixedBuffer sese::io::FixedBuilder

Public 成员函数

 AbstractFixedBuffer (size_t size) noexcept
 
 ~AbstractFixedBuffer () noexcept override
 
 AbstractFixedBuffer (const AbstractFixedBuffer &buffer) noexcept
 
 AbstractFixedBuffer (AbstractFixedBuffer &&buffer) noexcept
 
int64_t read (void *buffer, size_t length) override
 
int64_t write (const void *buffer, size_t length) override
 
int64_t peek (void *buffer, size_t length) override
 
int64_t trunc (size_t length) override
 
virtual void reset () noexcept
 
const char * data () const
 
size_t getSize () const noexcept
 
size_t getReadSize () const noexcept
 
size_t getWriteSize () const noexcept
 
size_t getReadableSize () const noexcept
 
size_t getWriteableSize () const noexcept
 
- 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
 

Protected 属性

size_t size {}
 
size_t readSize {}
 
size_t writeSize {}
 
char * buffer {}
 

额外继承的成员函数

- 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
 

详细描述

固定大小的字节缓冲区类

构造及析构函数说明

◆ AbstractFixedBuffer() [1/3]

sese::io::AbstractFixedBuffer::AbstractFixedBuffer ( size_t size)
explicitnoexcept

◆ ~AbstractFixedBuffer()

sese::io::AbstractFixedBuffer::~AbstractFixedBuffer ( )
overridenoexcept

引用了 buffer.

◆ AbstractFixedBuffer() [2/3]

sese::io::AbstractFixedBuffer::AbstractFixedBuffer ( const AbstractFixedBuffer & buffer)
noexcept

◆ AbstractFixedBuffer() [3/3]

sese::io::AbstractFixedBuffer::AbstractFixedBuffer ( AbstractFixedBuffer && buffer)
noexcept

成员函数说明

◆ data()

const char * sese::io::AbstractFixedBuffer::data ( ) const
inlinenodiscard

引用了 buffer.

◆ getReadableSize()

size_t sese::io::AbstractFixedBuffer::getReadableSize ( ) const
inlinenodiscardnoexcept

引用了 readSize , 以及 writeSize.

被这些函数引用 sese::io::FixedBuffer::getReadableSize().

◆ getReadSize()

size_t sese::io::AbstractFixedBuffer::getReadSize ( ) const
inlinenodiscardnoexcept

引用了 readSize.

◆ getSize()

size_t sese::io::AbstractFixedBuffer::getSize ( ) const
inlinenodiscardnoexcept

引用了 size.

◆ getWriteableSize()

size_t sese::io::AbstractFixedBuffer::getWriteableSize ( ) const
inlinenodiscardnoexcept

引用了 size , 以及 writeSize.

被这些函数引用 sese::io::FixedBuffer::getWriteableSize().

◆ getWriteSize()

size_t sese::io::AbstractFixedBuffer::getWriteSize ( ) const
inlinenodiscardnoexcept

引用了 writeSize.

◆ peek()

int64_t sese::io::AbstractFixedBuffer::peek ( void * buffer,
size_t length )
overridevirtual

仅读取内容,不步进

参数
buffer缓存
length缓存大小
返回
实际读取大小

实现了 sese::io::PeekableStream.

sese::io::FixedBuffer 重载.

引用了 read().

被这些函数引用 sese::io::FixedBuffer::peek().

◆ read()

int64_t sese::io::AbstractFixedBuffer::read ( void * buffer,
size_t length )
overridevirtual

实现了 sese::io::InputStream.

sese::io::FixedBuffer 重载.

引用了 read().

被这些函数引用 sese::io::FixedBuffer::read().

◆ reset()

void sese::io::AbstractFixedBuffer::reset ( )
virtualnoexcept

sese::io::FixedBuffer 重载.

被这些函数引用 sese::io::FixedBuffer::reset().

◆ trunc()

int64_t sese::io::AbstractFixedBuffer::trunc ( size_t length)
overridevirtual

仅步进,不读取内容

参数
length步进大小
返回
实际步进大小

实现了 sese::io::PeekableStream.

sese::io::FixedBuffer 重载.

引用了 read().

被这些函数引用 sese::io::FixedBuffer::trunc().

◆ write()

int64_t sese::io::AbstractFixedBuffer::write ( const void * buffer,
size_t length )
overridevirtual

实现了 sese::io::OutputStream.

sese::io::FixedBuffer 重载.

引用了 write().

被这些函数引用 sese::io::FixedBuffer::write().

类成员变量说明

◆ buffer

char* sese::io::AbstractFixedBuffer::buffer {}
protected

◆ readSize

size_t sese::io::AbstractFixedBuffer::readSize {}
protected

被这些函数引用 getReadableSize() , 以及 getReadSize().

◆ size

size_t sese::io::AbstractFixedBuffer::size {}
protected

被这些函数引用 getSize() , 以及 getWriteableSize().

◆ writeSize

size_t sese::io::AbstractFixedBuffer::writeSize {}
protected

被这些函数引用 getReadableSize(), getWriteableSize() , 以及 getWriteSize().


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