ps
Class CFileUnpacker
in FileUnpacker.h
in FileUnpacker.cpp
- class CFileUnpacker
|
Constructor Summary |
CFileUnpacker()
|
~CFileUnpacker()
Read: open and read in given file, check magic bits against those given; throw
variety of exceptions for missing files etc |
|
Method Summary |
u32 |
GetVersion() const
|
void |
Read( const char* filename, const char magicstr[ 4] )
UnpackRaw: unpack given number of bytes from the input stream into the given array
- throws CFileEOFError if the end of the data stream is reached before the given
number of bytes have been read |
void |
UnpackRaw( void* rawdata, u32 rawdatalen )
UnpackString: unpack a string from the raw data stream
- throws CFileEOFError if eof is reached before the string length has been
satisfied |
void |
UnpackString( CStr8& result )
|
void |
UnpackString( CStr& result )
|
m_Buf
private FileIOBuf m_Buf;
m_Size
private size_t m_Size;
m_UnpackPos
private u32 m_UnpackPos;
m_Version
private u32 m_Version;
CFileUnpacker
public CFileUnpacker();
~CFileUnpacker
public ~CFileUnpacker();
- Read: open and read in given file, check magic bits against those given; throw
variety of exceptions for missing files etc
GetVersion
public u32 GetVersion() const;
Read
public void Read( const char* filename, const char magicstr[ 4] );
- UnpackRaw: unpack given number of bytes from the input stream into the given array
- throws CFileEOFError if the end of the data stream is reached before the given
number of bytes have been read
UnpackRaw
public void UnpackRaw( void* rawdata, u32 rawdatalen );
- UnpackString: unpack a string from the raw data stream
- throws CFileEOFError if eof is reached before the string length has been
satisfied
UnpackString
public void UnpackString( CStr8& result );
UnpackString
void UnpackString( CStr& result );