Sese Framework
x.y.z
A cross-platform framework
|
线程安全的字节缓冲类 更多...
#include <ByteBuffer.h>
Public 类型 | |
using | Ptr = std::unique_ptr<ByteBuffer> |
Public 成员函数 | |
ByteBuffer (size_t base_size=STREAM_BYTE_STREAM_SIZE_FACTOR, size_t factor=STREAM_BYTE_STREAM_SIZE_FACTOR) | |
void | resetPos () override |
重置读取位置 | |
bool | eof () override |
是否有可读数据 | |
size_t | getLength () |
size_t | getCapacity () |
size_t | freeCapacity () override |
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 |
Private 成员函数 | |
virtual size_t | getCapacity () const |
virtual size_t | getLength () const |
Private 成员函数 继承自 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 size_t | getReadableSize () const |
virtual void | swap (AbstractByteBuffer &other) noexcept |
Private 成员函数 继承自 sese::io::InputStream | |
virtual | ~InputStream () noexcept=default |
Private 成员函数 继承自 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) |
Private 成员函数 继承自 sese::io::PeekableStream | |
virtual | ~PeekableStream ()=default |
Private 属性 | |
std::mutex | mutex |
额外继承的成员函数 | |
Private 类型 继承自 sese::io::Stream | |
typedef std::shared_ptr< Stream > | Ptr |
Private 类型 继承自 sese::io::InputStream | |
typedef std::shared_ptr< InputStream > | Ptr |
Private 类型 继承自 sese::io::OutputStream | |
typedef std::shared_ptr< OutputStream > | Ptr |
Private 类型 继承自 sese::io::PeekableStream | |
typedef std::shared_ptr< PeekableStream > | Ptr |
线程安全的字节缓冲类
using sese::io::ByteBuffer::Ptr = std::unique_ptr<ByteBuffer> |
|
explicit |
|
overridevirtual |
|
overridevirtual |
|
nodiscard |
|
nodiscardprivatevirtual |
|
nodiscard |
|
nodiscardprivatevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
private |
被这些函数引用 read().