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

Output buffer wrapper. More...

#include <OutputBufferWrapper.h>

Inheritance diagram for sese::io::OutputBufferWrapper:
sese::io::OutputStream

Public Member Functions

 OutputBufferWrapper (char *buffer, size_t cap)
 
int64_t write (const void *buffer, size_t length) override
 
void reset () noexcept
 
const char * getBuffer () const
 
size_t getLength () const
 
size_t getCapacity () const
 
- 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)
 

Protected Attributes

char * buffer = nullptr
 
size_t len = 0
 
size_t cap = 0
 

Additional Inherited Members

- Public Types inherited from sese::io::OutputStream
typedef std::shared_ptr< OutputStreamPtr
 

Detailed Description

Output buffer wrapper.

Constructor & Destructor Documentation

◆ OutputBufferWrapper()

sese::io::OutputBufferWrapper::OutputBufferWrapper ( char * buffer,
size_t cap )

Member Function Documentation

◆ getBuffer()

const char * sese::io::OutputBufferWrapper::getBuffer ( ) const
nodiscard

References buffer.

◆ getCapacity()

size_t sese::io::OutputBufferWrapper::getCapacity ( ) const
nodiscard

◆ getLength()

size_t sese::io::OutputBufferWrapper::getLength ( ) const
nodiscard

◆ reset()

void sese::io::OutputBufferWrapper::reset ( )
noexcept

◆ write()

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

Member Data Documentation

◆ buffer

char* sese::io::OutputBufferWrapper::buffer = nullptr
protected

Referenced by getBuffer().

◆ cap

size_t sese::io::OutputBufferWrapper::cap = 0
protected

◆ len

size_t sese::io::OutputBufferWrapper::len = 0
protected

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