A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
EGG::Stream Class Referenceabstract

#include <Stream.hh>

Description

A stream of data, abstracted to allow for continuous seeking.

Definition at line 10 of file Stream.hh.

Inheritance diagram for EGG::Stream:

Public Member Functions

virtual void read (void *output, u32 size)=0
 
virtual void write (void *input, u32 size)=0
 
virtual bool eof () const =0
 
virtual bool safe (u32 size) const =0
 
virtual bool bad () const =0
 
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 ()
 

Protected Attributes

std::endian m_endian
 
u32 m_index
 

Private Member Functions

template<ParseableType T>
read ()
 

Constructor & Destructor Documentation

◆ Stream()

EGG::Stream::Stream ( )

Definition at line 5 of file Stream.cc.

Member Function Documentation

◆ index()

u32 EGG::Stream::index ( ) const
inlinenodiscard

Definition at line 28 of file Stream.hh.

◆ jump()

void EGG::Stream::jump ( u32 index)

Definition at line 14 of file Stream.cc.

◆ read()

template<ParseableType T>
T EGG::Stream::read ( )
inlinenodiscardprivate

Definition at line 49 of file Stream.hh.

◆ read_f32()

f32 EGG::Stream::read_f32 ( )
nodiscard

Definition at line 51 of file Stream.cc.

◆ read_f64()

f64 EGG::Stream::read_f64 ( )
nodiscard

Definition at line 55 of file Stream.cc.

◆ read_s16()

s16 EGG::Stream::read_s16 ( )
nodiscard

Definition at line 39 of file Stream.cc.

◆ read_s32()

s32 EGG::Stream::read_s32 ( )
nodiscard

Definition at line 43 of file Stream.cc.

◆ read_s64()

s64 EGG::Stream::read_s64 ( )
nodiscard

Definition at line 47 of file Stream.cc.

◆ read_s8()

s8 EGG::Stream::read_s8 ( )
nodiscard

Definition at line 35 of file Stream.cc.

◆ read_u16()

u16 EGG::Stream::read_u16 ( )
nodiscard

Definition at line 23 of file Stream.cc.

◆ read_u32()

u32 EGG::Stream::read_u32 ( )
nodiscard

Definition at line 27 of file Stream.cc.

◆ read_u64()

u64 EGG::Stream::read_u64 ( )
nodiscard

Definition at line 31 of file Stream.cc.

◆ read_u8()

u8 EGG::Stream::read_u8 ( )
nodiscard

Definition at line 19 of file Stream.cc.

◆ setEndian()

void EGG::Stream::setEndian ( std::endian endian)
inline

Definition at line 24 of file Stream.hh.

◆ skip()

void EGG::Stream::skip ( u32 count)

Definition at line 9 of file Stream.cc.

Member Data Documentation

◆ m_endian

std::endian EGG::Stream::m_endian
protected

Definition at line 44 of file Stream.hh.

◆ m_index

u32 EGG::Stream::m_index
protected

Definition at line 45 of file Stream.hh.