#include <Stream.hh>
A stream of data stored in memory.
RamStream solves two problems:
Public Member Functions | |
RamStream (const void *buffer, u32 size) | |
void | read (void *output, u32 size) override |
void | write (void *input, u32 size) override |
bool | eof () const override |
bool | safe (u32 size) const override |
bool | bad () const override |
std::string | read_string () |
RamStream | split (u32 size) |
Splits the current stream into two. | |
void | setBufferAndSize (void *buffer, u32 size) |
u8 * | data () |
u8 * | dataAtIndex () |
![]() | |
void | skip (u32 count) |
void | jump (u32 index) |
void | setEndian (std::endian endian) |
u32 | index () const |
u8 | read_u8 () |
u16 | read_u16 () |
u32 | read_u32 () |
u64 | read_u64 () |
s8 | read_s8 () |
s16 | read_s16 () |
s32 | read_s32 () |
s64 | read_s64 () |
f32 | read_f32 () |
f64 | read_f64 () |
Private Attributes | |
u8 * | m_buffer |
u32 | m_size |
Additional Inherited Members | |
![]() | |
std::endian | m_endian |
u32 | m_index |
EGG::RamStream::RamStream | ( | const void * | buffer, |
u32 | size ) |
|
inlinenodiscardoverridevirtual |
Implements EGG::Stream.
|
inlinenodiscardoverridevirtual |
Implements EGG::Stream.
|
overridevirtual |
Implements EGG::Stream.
|
inlinenodiscardoverridevirtual |
Implements EGG::Stream.
void EGG::RamStream::setBufferAndSize | ( | void * | buffer, |
u32 | size ) |
|
nodiscard |
|
overridevirtual |
Implements EGG::Stream.