Athena IO Library
athena::io::IStreamReader Class Referenceabstract

The IStreamReader class defines a basic API for reading from streams, Implementors are provided with one pure virtual function that must be implemented in order to interact with the stream. More...

#include <IStreamReader.hpp>

Inheritance diagram for athena::io::IStreamReader:
Inheritance graph
Collaboration diagram for athena::io::IStreamReader:
Collaboration graph

Public Member Functions

virtual void seek (atInt64 pos, SeekOrigin origin=SeekOrigin::Current)=0
 Sets the buffers position relative to the specified position.
It seeks relative to the current position by default. More...
 
void seekAlign64 ()
 Sets the buffer's position relative to the next 64-byte aligned position.

 
void seekAlign32 ()
 Sets the buffers position relative to the next 32-byte aligned position.

 
void seekAlign16 ()
 Sets the buffer's position relative to the next 16-byte aligned position.

 
bool atEnd () const
 Returns whether or not the stream is at the end. More...
 
virtual atUint64 position () const =0
 Returns the current position in the stream. More...
 
virtual atUint64 length () const =0
 Returns the length of the file. More...
 
atInt8 readByte ()
 Reads a byte at the current position and advances the current position. More...
 
template<class T >
atInt8 readVal (typename std::enable_if< std::is_same< T, atInt8 >::value >::type *=0)
 
template<class T >
atInt8 readValLittle (typename std::enable_if< std::is_same< T, atInt8 >::value >::type *=0)
 
template<class T >
atInt8 readValBig (typename std::enable_if< std::is_same< T, atInt8 >::value >::type *=0)
 
atUint8 readUByte ()
 Reads a byte at the current position and advances the current position. More...
 
template<class T >
atUint8 readVal (typename std::enable_if< std::is_same< T, atUint8 >::value >::type *=0)
 
template<class T >
atUint8 readValLittle (typename std::enable_if< std::is_same< T, atUint8 >::value >::type *=0)
 
template<class T >
atUint8 readValBig (typename std::enable_if< std::is_same< T, atUint8 >::value >::type *=0)
 
std::unique_ptr< atInt8[]> readBytes (atUint64 length)
 Reads a byte at the current position and advances the current position. More...
 
std::unique_ptr< atUint8[]> readUBytes (atUint64 length)
 Reads a byte at the current position and advances the current position. More...
 
atUint64 readBytesToBuf (void *buf, atUint64 len)
 Attempts to read a fixed length of data into a pre-allocated buffer. More...
 
virtual atUint64 readUBytesToBuf (void *buf, atUint64 len)=0
 Attempts to read a fixed length of data into a pre-allocated buffer, this function is client defined and must be implemented. More...
 
atInt16 readInt16 ()
 Reads a Int16 and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atInt16 readVal (typename std::enable_if< std::is_same< T, atInt16 >::value >::type *=0)
 
atInt16 readInt16Little ()
 Reads a Int16 and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atInt16 readValLittle (typename std::enable_if< std::is_same< T, atInt16 >::value >::type *=0)
 
atInt16 readInt16Big ()
 Reads a Int16 and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atInt16 readValBig (typename std::enable_if< std::is_same< T, atInt16 >::value >::type *=0)
 
atUint16 readUint16 ()
 Reads a Uint16 and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atUint16 readVal (typename std::enable_if< std::is_same< T, atUint16 >::value >::type *=0)
 
atUint16 readUint16Little ()
 Reads a Uint16 and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atUint16 readValLittle (typename std::enable_if< std::is_same< T, atUint16 >::value >::type *=0)
 
atUint16 readUint16Big ()
 Reads a Uint16 and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atUint16 readValBig (typename std::enable_if< std::is_same< T, atUint16 >::value >::type *=0)
 
atInt32 readInt32 ()
 Reads a Int32 and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atInt32 readVal (typename std::enable_if< std::is_same< T, atInt32 >::value >::type *=0)
 
atInt32 readInt32Little ()
 Reads a Int32 and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atInt32 readValLittle (typename std::enable_if< std::is_same< T, atInt32 >::value >::type *=0)
 
atInt32 readInt32Big ()
 Reads a Int32 and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atInt32 readValBig (typename std::enable_if< std::is_same< T, atInt32 >::value >::type *=0)
 
atUint32 readUint32 ()
 Reads a Uint32 and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atUint32 readVal (typename std::enable_if< std::is_same< T, atUint32 >::value >::type *=0)
 
atUint32 readUint32Little ()
 Reads a Uint32 and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atInt32 readValLittle (typename std::enable_if< std::is_same< T, atUint32 >::value >::type *=0)
 
atUint32 readUint32Big ()
 Reads a Uint32 and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atUint32 readValBig (typename std::enable_if< std::is_same< T, atUint32 >::value >::type *=0)
 
atInt64 readInt64 ()
 Reads a Int64 and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atInt64 readVal (typename std::enable_if< std::is_same< T, atInt64 >::value >::type *=0)
 
atInt64 readInt64Little ()
 Reads a Int64 and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atInt64 readValLittle (typename std::enable_if< std::is_same< T, atInt64 >::value >::type *=0)
 
atInt64 readInt64Big ()
 Reads a Int64 and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atInt64 readValBig (typename std::enable_if< std::is_same< T, atInt64 >::value >::type *=0)
 
atUint64 readUint64 ()
 Reads a Uint64 and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atUint64 readVal (typename std::enable_if< std::is_same< T, atUint64 >::value >::type *=0)
 
atUint64 readUint64Little ()
 Reads a Uint64 and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atUint64 readValLittle (typename std::enable_if< std::is_same< T, atUint64 >::value >::type *=0)
 
atUint64 readUint64Big ()
 Reads a Uint64 and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atUint64 readValBig (typename std::enable_if< std::is_same< T, atUint64 >::value >::type *=0)
 
float readFloat ()
 Reads a float and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
float readVal (typename std::enable_if< std::is_same< T, float >::value >::type *=0)
 
float readFloatLittle ()
 Reads a float and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
float readValLittle (typename std::enable_if< std::is_same< T, float >::value >::type *=0)
 
float readFloatBig ()
 Reads a float and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
float readValBig (typename std::enable_if< std::is_same< T, float >::value >::type *=0)
 
double readDouble ()
 Reads a double and swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
double readVal (typename std::enable_if< std::is_same< T, double >::value >::type *=0)
 
double readDoubleLittle ()
 Reads a double and swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
double readValLittle (typename std::enable_if< std::is_same< T, double >::value >::type *=0)
 
double readDoubleBig ()
 Reads a double and swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
double readValBig (typename std::enable_if< std::is_same< T, double >::value >::type *=0)
 
bool readBool ()
 Reads a bool and advances the current position. More...
 
template<class T >
bool readVal (typename std::enable_if< std::is_same< T, bool >::value >::type *=0)
 
template<class T >
bool readValLittle (typename std::enable_if< std::is_same< T, bool >::value >::type *=0)
 
template<class T >
bool readValBig (typename std::enable_if< std::is_same< T, bool >::value >::type *=0)
 
atVec2f readVec2f ()
 Reads an atVec2f (8 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atVec2f readVal (typename std::enable_if< std::is_same< T, atVec2f >::value >::type *=0)
 
atVec2f readVec2fLittle ()
 Reads an atVec2f (8 bytes), swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atVec2f readValLittle (typename std::enable_if< std::is_same< T, atVec2f >::value >::type *=0)
 
atVec2f readVec2fBig ()
 Reads an atVec2f (8 bytes), swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atVec2f readValBig (typename std::enable_if< std::is_same< T, atVec2f >::value >::type *=0)
 
atVec3f readVec3f ()
 Reads an atVec3f (12 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atVec3f readVal (typename std::enable_if< std::is_same< T, atVec3f >::value >::type *=0)
 
atVec3f readVec3fLittle ()
 Reads an atVec3f (12 bytes), swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atVec3f readValLittle (typename std::enable_if< std::is_same< T, atVec3f >::value >::type *=0)
 
atVec3f readVec3fBig ()
 Reads an atVec3f (12 bytes), swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atVec3f readValBig (typename std::enable_if< std::is_same< T, atVec3f >::value >::type *=0)
 
atVec4f readVec4f ()
 Reads an atVec4f (16 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atVec4f readVal (typename std::enable_if< std::is_same< T, atVec4f >::value >::type *=0)
 
atVec4f readVec4fLittle ()
 Reads an atVec4f (16 bytes), swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atVec4f readValLittle (typename std::enable_if< std::is_same< T, atVec4f >::value >::type *=0)
 
atVec4f readVec4fBig ()
 Reads an atVec4f (16 bytes), swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atVec4f readValBig (typename std::enable_if< std::is_same< T, atVec4f >::value >::type *=0)
 
atVec2d readVec2d ()
 Reads an atVec2d (16 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atVec2d readVal (typename std::enable_if< std::is_same< T, atVec2d >::value >::type *=0)
 
atVec2d readVec2dLittle ()
 Reads an atVec2d (16 bytes), swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atVec2d readValLittle (typename std::enable_if< std::is_same< T, atVec2d >::value >::type *=0)
 
atVec2d readVec2dBig ()
 Reads an atVec2d (16 bytes), swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atVec2d readValBig (typename std::enable_if< std::is_same< T, atVec2d >::value >::type *=0)
 
atVec3d readVec3d ()
 Reads an atVec3d (24 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atVec3d readVal (typename std::enable_if< std::is_same< T, atVec3d >::value >::type *=0)
 
atVec3d readVec3dLittle ()
 Reads an atVec3d (24 bytes), swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atVec3d readValLittle (typename std::enable_if< std::is_same< T, atVec3d >::value >::type *=0)
 
atVec3d readVec3dBig ()
 Reads an atVec3d (24 bytes), swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atVec3d readValBig (typename std::enable_if< std::is_same< T, atVec3d >::value >::type *=0)
 
atVec4d readVec4d ()
 Reads an atVec4d (32 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position. More...
 
template<class T >
atVec4d readVal (typename std::enable_if< std::is_same< T, atVec4d >::value >::type *=0)
 
atVec4d readVec4dLittle ()
 Reads an atVec4d (32 bytes), swaps against little endianness depending on platform and advances the current position. More...
 
template<class T >
atVec4d readValLittle (typename std::enable_if< std::is_same< T, atVec4d >::value >::type *=0)
 
atVec4d readVec4dBig ()
 Reads an atVec4d (32 bytes), swaps against big endianness depending on platform and advances the current position. More...
 
template<class T >
atVec4d readValBig (typename std::enable_if< std::is_same< T, atVec4d >::value >::type *=0)
 
std::string readWStringAsString (atInt32 fixedLen=-1)
 Reads a wide-char string (using endianness from setEndian), converts to UTF8 and advances the position in the file. More...
 
std::string readWStringAsStringLittle (atInt32 fixedLen=-1)
 Reads a wide-char string (against little-endian), converts to UTF8 and advances the position in the file. More...
 
std::string readWStringAsStringBig (atInt32 fixedLen=-1)
 Reads a wide-char string (against big-endian), converts to UTF8 and advances the position in the file. More...
 
std::string readString (atInt32 fixedLen=-1)
 Reads a string and advances the position in the file. More...
 
template<class T >
std::string readVal (typename std::enable_if< std::is_same< T, std::string >::value >::type *=0)
 
std::wstring readWString (atInt32 fixedLen=-1)
 Reads a wstring and advances the position in the file. More...
 
template<class T >
std::wstring readVal (typename std::enable_if< std::is_same< T, std::wstring >::value >::type *=0)
 
std::wstring readWStringLittle (atInt32 fixedLen=-1)
 Reads a wstring assuming little-endian characters and advances the position in the file. More...
 
template<class T >
std::wstring readValLittle (typename std::enable_if< std::is_same< T, std::wstring >::value >::type *=0)
 
std::wstring readWStringBig (atInt32 fixedLen=-1)
 Reads a wstring assuming big-endian characters and advances the position in the file. More...
 
template<class T >
std::wstring readValBig (typename std::enable_if< std::is_same< T, std::wstring >::value >::type *=0)
 
template<class T >
void enumerate (std::vector< T > &vector, size_t count, typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, atVec2f >::value||std::is_same< T, atVec3f >::value||std::is_same< T, atVec4f >::value >::type *=0)
 Performs automatic std::vector enumeration reads using numeric type T. More...
 
template<class T >
void enumerateLittle (std::vector< T > &vector, size_t count, typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, atVec2f >::value||std::is_same< T, atVec3f >::value||std::is_same< T, atVec4f >::value >::type *=0)
 Performs automatic std::vector enumeration reads using numeric type T. More...
 
template<class T >
void enumerateBig (std::vector< T > &vector, size_t count, typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, atVec2f >::value||std::is_same< T, atVec3f >::value||std::is_same< T, atVec4f >::value >::type *=0)
 Performs automatic std::vector enumeration reads using numeric type T. More...
 
template<class T >
void enumerate (std::vector< T > &vector, size_t count, typename std::enable_if<!std::is_arithmetic< T >::value &&!std::is_same< T, atVec2f >::value &&!std::is_same< T, atVec3f >::value &&!std::is_same< T, atVec4f >::value >::type *=0)
 Performs automatic std::vector enumeration reads using non-numeric type T. More...
 
template<class T >
void enumerate (std::vector< T > &vector, size_t count, std::function< void(IStreamReader &, T &)> readf)
 Performs lambda-assisted std::vector enumeration reads using type T. More...
 
- Public Member Functions inherited from athena::io::IStream
void setEndian (Endian endian)
 
Endian endian () const
 
bool isBigEndian () const
 
bool isLittleEndian () const
 
bool hasError () const
 

Additional Inherited Members

- Protected Member Functions inherited from athena::io::IStream
void setError ()
 
- Protected Attributes inherited from athena::io::IStream
bool m_hasError = false
 
Endian m_endian = BigEndian
 

Detailed Description

The IStreamReader class defines a basic API for reading from streams, Implementors are provided with one pure virtual function that must be implemented in order to interact with the stream.

Most implementing classes will only need to implement IStreamReader::readUBytesToBuf(void*, atUint64) for basic stream intearaction

Definition at line 18 of file IStreamReader.hpp.

Member Function Documentation

bool athena::io::IStreamReader::atEnd ( ) const
inlinevirtual

Returns whether or not the stream is at the end.

Returns
True if at end; False otherwise.

Implements athena::io::IStream.

Definition at line 46 of file IStreamReader.hpp.

Here is the call graph for this function:

template<class T >
void athena::io::IStreamReader::enumerate ( std::vector< T > &  vector,
size_t  count,
typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, atVec2f >::value||std::is_same< T, atVec3f >::value||std::is_same< T, atVec4f >::value >::type *  = 0 
)
inline

Performs automatic std::vector enumeration reads using numeric type T.

Parameters
vectorThe std::vector to clear and populate using read data
countThe number of elements to read into vector

Endianness is set with setEndian

Definition at line 1138 of file IStreamReader.hpp.

template<class T >
void athena::io::IStreamReader::enumerate ( std::vector< T > &  vector,
size_t  count,
typename std::enable_if<!std::is_arithmetic< T >::value &&!std::is_same< T, atVec2f >::value &&!std::is_same< T, atVec3f >::value &&!std::is_same< T, atVec4f >::value >::type *  = 0 
)
inline

Performs automatic std::vector enumeration reads using non-numeric type T.

Parameters
vectorThe std::vector to clear and populate using read data
countThe number of elements to read into vector

Definition at line 1196 of file IStreamReader.hpp.

template<class T >
void athena::io::IStreamReader::enumerate ( std::vector< T > &  vector,
size_t  count,
std::function< void(IStreamReader &, T &)>  readf 
)
inline

Performs lambda-assisted std::vector enumeration reads using type T.

Parameters
vectorThe std::vector to clear and populate using read data
countThe number of elements to read into vector
readfFunction (e.g. a lambda) that reads one element and assigns the value through the second argument

Definition at line 1219 of file IStreamReader.hpp.

template<class T >
void athena::io::IStreamReader::enumerateBig ( std::vector< T > &  vector,
size_t  count,
typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, atVec2f >::value||std::is_same< T, atVec3f >::value||std::is_same< T, atVec4f >::value >::type *  = 0 
)
inline

Performs automatic std::vector enumeration reads using numeric type T.

Parameters
vectorThe std::vector to clear and populate using read data
countThe number of elements to read into vector

Endianness is big

Definition at line 1178 of file IStreamReader.hpp.

template<class T >
void athena::io::IStreamReader::enumerateLittle ( std::vector< T > &  vector,
size_t  count,
typename std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, atVec2f >::value||std::is_same< T, atVec3f >::value||std::is_same< T, atVec4f >::value >::type *  = 0 
)
inline

Performs automatic std::vector enumeration reads using numeric type T.

Parameters
vectorThe std::vector to clear and populate using read data
countThe number of elements to read into vector

Endianness is little

Definition at line 1158 of file IStreamReader.hpp.

virtual atUint64 athena::io::IStreamReader::length ( ) const
pure virtual

Returns the length of the file.

Returns
True length of the file.

Implements athena::io::IStream.

Implemented in athena::io::MemoryReader, and athena::io::FileReader.

Here is the caller graph for this function:

virtual atUint64 athena::io::IStreamReader::position ( ) const
pure virtual

Returns the current position in the stream.

Returns
The current position in the stream.

Implements athena::io::IStream.

Implemented in athena::io::MemoryReader, and athena::io::FileReader.

Here is the caller graph for this function:

bool athena::io::IStreamReader::readBool ( )
inline

Reads a bool and advances the current position.

Returns
The value at the current address

Definition at line 481 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt8 athena::io::IStreamReader::readByte ( )
inline

Reads a byte at the current position and advances the current position.

Returns
The value at the current position

Definition at line 65 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::unique_ptr<atInt8[]> athena::io::IStreamReader::readBytes ( atUint64  length)
inline

Reads a byte at the current position and advances the current position.

Returns
The buffer at the current position from the given length.

Definition at line 95 of file IStreamReader.hpp.

Here is the call graph for this function:

atUint64 athena::io::IStreamReader::readBytesToBuf ( void *  buf,
atUint64  len 
)
inline

Attempts to read a fixed length of data into a pre-allocated buffer.

Parameters
bufThe buffer to read into
lenThe length of the buffer
Returns
How much data was actually read, useful for detecting read errors.

Definition at line 118 of file IStreamReader.hpp.

Here is the call graph for this function:

double athena::io::IStreamReader::readDouble ( )
inline

Reads a double and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 437 of file IStreamReader.hpp.

Here is the call graph for this function:

double athena::io::IStreamReader::readDoubleBig ( )
inline

Reads a double and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 467 of file IStreamReader.hpp.

Here is the call graph for this function:

double athena::io::IStreamReader::readDoubleLittle ( )
inline

Reads a double and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 452 of file IStreamReader.hpp.

Here is the call graph for this function:

float athena::io::IStreamReader::readFloat ( )
inline

Reads a float and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 392 of file IStreamReader.hpp.

Here is the call graph for this function:

float athena::io::IStreamReader::readFloatBig ( )
inline

Reads a float and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 422 of file IStreamReader.hpp.

Here is the call graph for this function:

float athena::io::IStreamReader::readFloatLittle ( )
inline

Reads a float and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 407 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt16 athena::io::IStreamReader::readInt16 ( )
inline

Reads a Int16 and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 134 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atInt16 athena::io::IStreamReader::readInt16Big ( )
inline

Reads a Int16 and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 164 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt16 athena::io::IStreamReader::readInt16Little ( )
inline

Reads a Int16 and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 149 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt32 athena::io::IStreamReader::readInt32 ( )
inline

Reads a Int32 and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 220 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atInt32 athena::io::IStreamReader::readInt32Big ( )
inline

Reads a Int32 and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 250 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt32 athena::io::IStreamReader::readInt32Little ( )
inline

Reads a Int32 and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 235 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt64 athena::io::IStreamReader::readInt64 ( )
inline

Reads a Int64 and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 306 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atInt64 athena::io::IStreamReader::readInt64Big ( )
inline

Reads a Int64 and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 336 of file IStreamReader.hpp.

Here is the call graph for this function:

atInt64 athena::io::IStreamReader::readInt64Little ( )
inline

Reads a Int64 and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 321 of file IStreamReader.hpp.

Here is the call graph for this function:

std::string athena::io::IStreamReader::readString ( atInt32  fixedLen = -1)
inline

Reads a string and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read string

Definition at line 1003 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atUint8 athena::io::IStreamReader::readUByte ( )
inline

Reads a byte at the current position and advances the current position.

Returns
The value at the current position

Definition at line 80 of file IStreamReader.hpp.

Here is the call graph for this function:

std::unique_ptr<atUint8[]> athena::io::IStreamReader::readUBytes ( atUint64  length)
inline

Reads a byte at the current position and advances the current position.

Returns
The buffer at the current position from the given length.

Definition at line 106 of file IStreamReader.hpp.

Here is the call graph for this function:

virtual atUint64 athena::io::IStreamReader::readUBytesToBuf ( void *  buf,
atUint64  len 
)
pure virtual

Attempts to read a fixed length of data into a pre-allocated buffer, this function is client defined and must be implemented.

Parameters
bufThe buffer to read into
lenThe length of the buffer
Returns
How much data was actually read, useful for detecting read errors.

Implemented in athena::io::MemoryReader, and athena::io::FileReader.

Here is the caller graph for this function:

atUint16 athena::io::IStreamReader::readUint16 ( )
inline

Reads a Uint16 and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 179 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atUint16 athena::io::IStreamReader::readUint16Big ( )
inline

Reads a Uint16 and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 205 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atUint16 athena::io::IStreamReader::readUint16Little ( )
inline

Reads a Uint16 and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 190 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

atUint32 athena::io::IStreamReader::readUint32 ( )
inline

Reads a Uint32 and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 265 of file IStreamReader.hpp.

Here is the call graph for this function:

atUint32 athena::io::IStreamReader::readUint32Big ( )
inline

Reads a Uint32 and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 291 of file IStreamReader.hpp.

Here is the call graph for this function:

atUint32 athena::io::IStreamReader::readUint32Little ( )
inline

Reads a Uint32 and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 276 of file IStreamReader.hpp.

Here is the call graph for this function:

atUint64 athena::io::IStreamReader::readUint64 ( )
inline

Reads a Uint64 and swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 351 of file IStreamReader.hpp.

Here is the call graph for this function:

atUint64 athena::io::IStreamReader::readUint64Big ( )
inline

Reads a Uint64 and swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 377 of file IStreamReader.hpp.

Here is the call graph for this function:

atUint64 athena::io::IStreamReader::readUint64Little ( )
inline

Reads a Uint64 and swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 362 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec2d athena::io::IStreamReader::readVec2d ( )
inline

Reads an atVec2d (16 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 691 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec2d athena::io::IStreamReader::readVec2dBig ( )
inline

Reads an atVec2d (16 bytes), swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 733 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec2d athena::io::IStreamReader::readVec2dLittle ( )
inline

Reads an atVec2d (16 bytes), swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 716 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec2f athena::io::IStreamReader::readVec2f ( )
inline

Reads an atVec2f (8 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 502 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec2f athena::io::IStreamReader::readVec2fBig ( )
inline

Reads an atVec2f (8 bytes), swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 544 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec2f athena::io::IStreamReader::readVec2fLittle ( )
inline

Reads an atVec2f (8 bytes), swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 527 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec3d athena::io::IStreamReader::readVec3d ( )
inline

Reads an atVec3d (24 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 750 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec3d athena::io::IStreamReader::readVec3dBig ( )
inline

Reads an atVec3d (24 bytes), swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 795 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec3d athena::io::IStreamReader::readVec3dLittle ( )
inline

Reads an atVec3d (24 bytes), swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 777 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec3f athena::io::IStreamReader::readVec3f ( )
inline

Reads an atVec3f (12 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 561 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec3f athena::io::IStreamReader::readVec3fBig ( )
inline

Reads an atVec3f (12 bytes), swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 606 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec3f athena::io::IStreamReader::readVec3fLittle ( )
inline

Reads an atVec3f (12 bytes), swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 588 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec4d athena::io::IStreamReader::readVec4d ( )
inline

Reads an atVec4d (32 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 813 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec4d athena::io::IStreamReader::readVec4dBig ( )
inline

Reads an atVec4d (32 bytes), swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 861 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec4d athena::io::IStreamReader::readVec4dLittle ( )
inline

Reads an atVec4d (32 bytes), swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 842 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec4f athena::io::IStreamReader::readVec4f ( )
inline

Reads an atVec4f (16 bytes), swaps to endianness specified by setEndian depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 624 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec4f athena::io::IStreamReader::readVec4fBig ( )
inline

Reads an atVec4f (16 bytes), swaps against big endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 672 of file IStreamReader.hpp.

Here is the call graph for this function:

atVec4f athena::io::IStreamReader::readVec4fLittle ( )
inline

Reads an atVec4f (16 bytes), swaps against little endianness depending on platform and advances the current position.

Returns
The value at the current address

Definition at line 653 of file IStreamReader.hpp.

Here is the call graph for this function:

std::wstring athena::io::IStreamReader::readWString ( atInt32  fixedLen = -1)
inline

Reads a wstring and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read wstring

Definition at line 1035 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string athena::io::IStreamReader::readWStringAsString ( atInt32  fixedLen = -1)
inline

Reads a wide-char string (using endianness from setEndian), converts to UTF8 and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read string

Definition at line 881 of file IStreamReader.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string athena::io::IStreamReader::readWStringAsStringBig ( atInt32  fixedLen = -1)
inline

Reads a wide-char string (against big-endian), converts to UTF8 and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read string

Definition at line 963 of file IStreamReader.hpp.

Here is the call graph for this function:

std::string athena::io::IStreamReader::readWStringAsStringLittle ( atInt32  fixedLen = -1)
inline

Reads a wide-char string (against little-endian), converts to UTF8 and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read string

Definition at line 922 of file IStreamReader.hpp.

Here is the call graph for this function:

std::wstring athena::io::IStreamReader::readWStringBig ( atInt32  fixedLen = -1)
inline

Reads a wstring assuming big-endian characters and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read wstring

Definition at line 1103 of file IStreamReader.hpp.

Here is the call graph for this function:

std::wstring athena::io::IStreamReader::readWStringLittle ( atInt32  fixedLen = -1)
inline

Reads a wstring assuming little-endian characters and advances the position in the file.

Parameters
fixedLenIf non-negative, this is a fixed-length string read
Returns
The read wstring

Definition at line 1069 of file IStreamReader.hpp.

Here is the call graph for this function:

virtual void athena::io::IStreamReader::seek ( atInt64  pos,
SeekOrigin  origin = SeekOrigin::Current 
)
pure virtual

Sets the buffers position relative to the specified position.
It seeks relative to the current position by default.

Parameters
positionwhere in the buffer to seek
originThe Origin to seek relative to

Implements athena::io::IStream.

Implemented in athena::io::FileReader, and athena::io::MemoryReader.

Here is the caller graph for this function:


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