libeditwl
Lightweight C++ library for Nintendo DS(i) formats
Loading...
Searching...
No Matches
twl::fs::BufferReaderWriter Class Reference
Inheritance diagram for twl::fs::BufferReaderWriter:
twl::fs::AbstractReaderWriter

Public Member Functions

 BufferReaderWriter (const size_t buf_size)
 
 BufferReaderWriter (void *buf, const size_t buf_size, const bool transfer_ownership=true)
 
 BufferReaderWriter (const BufferReaderWriter &)=delete
 
 BufferReaderWriter (BufferReaderWriter &&)=default
 
void CreateAllocate (const size_t buf_size)
 
void CreateFrom (void *buf, const size_t buf_size, const bool transfer_ownership=true)
 
void Dispose ()
 
bool IsValid ()
 
void * GetBuffer ()
 
size_t GetBufferSize ()
 
Result SetOffset (const ssize_t offset, const Whence whence) override
 
size_t GetBufferOffset ()
 
Result GetOffset (size_t &out_offset) override
 
Result GetSize (size_t &out_size) override
 
Result ReadBuffer (void *read_buf, const size_t read_size) override
 
Result WriteBuffer (const void *write_buf, const size_t write_size) override
 
- Public Member Functions inherited from twl::fs::AbstractReaderWriter
Result SetAbsoluteOffset (const size_t offset)
 
Result MoveOffset (const ssize_t offset)
 
template<typename T>
Result Read (T &out_t)
 
template<typename T>
Result Write (const T &t)
 
template<typename T>
Result ReadLEB128 (T &out_t)
 
template<typename C>
Result ReadNullTerminatedString (std::basic_string< C > &out_str, const size_t tmp_buf_size=0x200)
 
template<typename C>
Result WriteString (const std::basic_string< C > &str)
 
Result WriteCString (const char *str)
 
Result WriteEnsureAlignmentPadding (const size_t align, size_t &out_pad_size)
 
Result WriteEnsureAlignment (const size_t align)
 
template<typename T>
Result WriteVector (const std::vector< T > &vec)
 
template<typename C>
Result WriteNullTerminatedString (const std::basic_string< C > &str)
 

Member Function Documentation

◆ GetOffset()

Result twl::fs::BufferReaderWriter::GetOffset ( size_t & out_offset)
inlineoverridevirtual

◆ GetSize()

Result twl::fs::BufferReaderWriter::GetSize ( size_t & out_size)
inlineoverridevirtual

◆ ReadBuffer()

Result twl::fs::BufferReaderWriter::ReadBuffer ( void * read_buf,
const size_t read_size )
overridevirtual

◆ SetOffset()

Result twl::fs::BufferReaderWriter::SetOffset ( const ssize_t offset,
const Whence whence )
overridevirtual

◆ WriteBuffer()

Result twl::fs::BufferReaderWriter::WriteBuffer ( const void * write_buf,
const size_t write_size )
overridevirtual

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