Polyphase Game Engine
Loading...
Searching...
No Matches
Stream Class Reference

#include <Stream.h>

Public Member Functions

 Stream ()
 
 Stream (const char *externalData, uint32_t externalSize)
 
 ~Stream ()
 
char * GetData ()
 
uint32_t GetSize () const
 
uint32_t GetPos ()
 
void SetPos (uint32_t pos)
 
void Reset ()
 
void Resize (uint32_t size)
 
void SetExternalData (const char *externalData, uint32_t externalSize)
 
bool ReadFile (const char *path, bool isAsset, int32_t maxSize=0)
 
bool WriteFile (const char *path)
 
void SetAsyncRequest (AsyncLoadRequest *request)
 
void SetAssetVersion (uint32_t version)
 
uint32_t GetAssetVersion () const
 
void ReadAsset (AssetRef &asset)
 
void WriteAsset (const AssetRef &asset)
 
void ReadString (std::string &dst)
 
void WriteString (const std::string &src)
 
void ReadBytes (uint8_t *dst, uint32_t length)
 
void WriteBytes (const uint8_t *src, uint32_t length)
 
uint32_t ReadBytesMax (uint8_t *dst, uint32_t length)
 
int32_t ReadInt32 ()
 
uint32_t ReadUint32 ()
 
int64_t ReadInt64 ()
 
uint64_t ReadUint64 ()
 
int16_t ReadInt16 ()
 
uint16_t ReadUint16 ()
 
int8_t ReadInt8 ()
 
uint8_t ReadUint8 ()
 
float ReadFloat ()
 
bool ReadBool ()
 
glm::vec2 ReadVec2 ()
 
glm::vec3 ReadVec3 ()
 
glm::vec4 ReadVec4 ()
 
glm::quat ReadQuat ()
 
glm::mat4 ReadMatrix ()
 
void WriteInt32 (const int32_t &src)
 
void WriteUint32 (const uint32_t &src)
 
void WriteInt64 (const int64_t &src)
 
void WriteUint64 (const uint64_t &src)
 
void WriteInt16 (const int16_t &src)
 
void WriteUint16 (const uint16_t &src)
 
void WriteInt8 (const int8_t &src)
 
void WriteUint8 (const uint8_t &src)
 
void WriteFloat (const float &src)
 
void WriteBool (const bool &src)
 
void WriteVec2 (const glm::vec2 &src)
 
void WriteVec3 (const glm::vec3 &src)
 
void WriteVec4 (const glm::vec4 &src)
 
void WriteQuat (const glm::quat &src)
 
void WriteMatrix (const glm::mat4 &src)
 
std::string GetLine ()
 
int32_t Scan (const char *format,...)
 

Constructor & Destructor Documentation

◆ Stream() [1/2]

Stream::Stream ( )

◆ Stream() [2/2]

Stream::Stream ( const char *  externalData,
uint32_t  externalSize 
)

◆ ~Stream()

Stream::~Stream ( )

Member Function Documentation

◆ GetAssetVersion()

uint32_t Stream::GetAssetVersion ( ) const

◆ GetData()

char * Stream::GetData ( )

◆ GetLine()

std::string Stream::GetLine ( )

◆ GetPos()

uint32_t Stream::GetPos ( )

◆ GetSize()

uint32_t Stream::GetSize ( ) const

◆ ReadAsset()

void Stream::ReadAsset ( AssetRef asset)

◆ ReadBool()

bool Stream::ReadBool ( )

◆ ReadBytes()

void Stream::ReadBytes ( uint8_t *  dst,
uint32_t  length 
)

◆ ReadBytesMax()

uint32_t Stream::ReadBytesMax ( uint8_t *  dst,
uint32_t  length 
)

◆ ReadFile()

bool Stream::ReadFile ( const char *  path,
bool  isAsset,
int32_t  maxSize = 0 
)

◆ ReadFloat()

float Stream::ReadFloat ( )

◆ ReadInt16()

int16_t Stream::ReadInt16 ( )

◆ ReadInt32()

int32_t Stream::ReadInt32 ( )

◆ ReadInt64()

int64_t Stream::ReadInt64 ( )

◆ ReadInt8()

int8_t Stream::ReadInt8 ( )

◆ ReadMatrix()

glm::mat4 Stream::ReadMatrix ( )

◆ ReadQuat()

glm::quat Stream::ReadQuat ( )

◆ ReadString()

void Stream::ReadString ( std::string &  dst)

◆ ReadUint16()

uint16_t Stream::ReadUint16 ( )

◆ ReadUint32()

uint32_t Stream::ReadUint32 ( )

◆ ReadUint64()

uint64_t Stream::ReadUint64 ( )

◆ ReadUint8()

uint8_t Stream::ReadUint8 ( )

◆ ReadVec2()

glm::vec2 Stream::ReadVec2 ( )

◆ ReadVec3()

glm::vec3 Stream::ReadVec3 ( )

◆ ReadVec4()

glm::vec4 Stream::ReadVec4 ( )

◆ Reset()

void Stream::Reset ( )

◆ Resize()

void Stream::Resize ( uint32_t  size)

◆ Scan()

int32_t Stream::Scan ( const char *  format,
  ... 
)

◆ SetAssetVersion()

void Stream::SetAssetVersion ( uint32_t  version)

◆ SetAsyncRequest()

void Stream::SetAsyncRequest ( AsyncLoadRequest request)

◆ SetExternalData()

void Stream::SetExternalData ( const char *  externalData,
uint32_t  externalSize 
)

◆ SetPos()

void Stream::SetPos ( uint32_t  pos)

◆ WriteAsset()

void Stream::WriteAsset ( const AssetRef asset)

◆ WriteBool()

void Stream::WriteBool ( const bool &  src)

◆ WriteBytes()

void Stream::WriteBytes ( const uint8_t *  src,
uint32_t  length 
)

◆ WriteFile()

bool Stream::WriteFile ( const char *  path)

◆ WriteFloat()

void Stream::WriteFloat ( const float &  src)

◆ WriteInt16()

void Stream::WriteInt16 ( const int16_t &  src)

◆ WriteInt32()

void Stream::WriteInt32 ( const int32_t &  src)

◆ WriteInt64()

void Stream::WriteInt64 ( const int64_t &  src)

◆ WriteInt8()

void Stream::WriteInt8 ( const int8_t &  src)

◆ WriteMatrix()

void Stream::WriteMatrix ( const glm::mat4 &  src)

◆ WriteQuat()

void Stream::WriteQuat ( const glm::quat &  src)

◆ WriteString()

void Stream::WriteString ( const std::string &  src)

◆ WriteUint16()

void Stream::WriteUint16 ( const uint16_t &  src)

◆ WriteUint32()

void Stream::WriteUint32 ( const uint32_t &  src)

◆ WriteUint64()

void Stream::WriteUint64 ( const uint64_t &  src)

◆ WriteUint8()

void Stream::WriteUint8 ( const uint8_t &  src)

◆ WriteVec2()

void Stream::WriteVec2 ( const glm::vec2 &  src)

◆ WriteVec3()

void Stream::WriteVec3 ( const glm::vec3 &  src)

◆ WriteVec4()

void Stream::WriteVec4 ( const glm::vec4 &  src)

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