![]() |
Plasma Engine
2.0
|
Interface for binary in (read) streams. More...
#include <Stream.h>

Public Member Functions | |
| plStreamReader () | |
| Constructor. | |
| virtual | ~plStreamReader () |
| Virtual destructor to ensure correct cleanup. | |
| virtual plUInt64 | ReadBytes (void *pReadBuffer, plUInt64 uiBytesToRead)=0 |
| Reads a raw number of bytes into the read buffer, this is the only method which has to be implemented to fully implement the interface. | |
| template<typename T > | |
| plResult | ReadWordValue (T *pWordValue) |
| Helper method to read a word value correctly (copes with potentially different endianess) | |
| template<typename T > | |
| plResult | ReadDWordValue (T *pDWordValue) |
| Helper method to read a dword value correctly (copes with potentially different endianess) | |
| template<typename T > | |
| plResult | ReadQWordValue (T *pQWordValue) |
| Helper method to read a qword value correctly (copes with potentially different endianess) | |
| template<typename ArrayType , typename ValueType > | |
| plResult | ReadArray (plArrayBase< ValueType, ArrayType > &inout_array) |
| Reads an array of elements from the stream. | |
| template<typename ValueType , plUInt16 uiSize, typename AllocatorWrapper > | |
| plResult | ReadArray (plSmallArray< ValueType, uiSize, AllocatorWrapper > &ref_array) |
| Reads a small array of elements from the stream. | |
| template<typename ValueType , plUInt32 uiSize> | |
| plResult | ReadArray (ValueType(&array)[uiSize]) |
| Writes a C style fixed array. | |
| template<typename KeyType , typename Comparer > | |
| plResult | ReadSet (plSetBase< KeyType, Comparer > &inout_set) |
| Reads a set. | |
| template<typename KeyType , typename ValueType , typename Comparer > | |
| plResult | ReadMap (plMapBase< KeyType, ValueType, Comparer > &inout_map) |
| Reads a map. | |
| template<typename KeyType , typename ValueType , typename Hasher > | |
| plResult | ReadHashTable (plHashTableBase< KeyType, ValueType, Hasher > &inout_hashTable) |
| Read a hash table (note that the entry order is not stable) | |
| plResult | ReadString (plStringBuilder &ref_sBuilder) |
| Reads a string into an plStringBuilder. | |
| plResult | ReadString (plString &ref_sString) |
| Reads a string into an plString. | |
| virtual plUInt64 | SkipBytes (plUInt64 uiBytesToSkip) |
| Helper method to skip a number of bytes (implementations of the stream reader may implement this more efficiently for example) | |
| PL_ALWAYS_INLINE plTypeVersion | ReadVersion (plTypeVersion expectedMaxVersion) |
Interface for binary in (read) streams.
|
pure virtual |
Reads a raw number of bytes into the read buffer, this is the only method which has to be implemented to fully implement the interface.
Implemented in plChunkStreamReader, plFileReader, plMemoryStreamReader, and plRawMemoryStreamReader.
|
inlinevirtual |
Helper method to skip a number of bytes (implementations of the stream reader may implement this more efficiently for example)
Reimplemented in plFileReader, plMemoryStreamReader, and plRawMemoryStreamReader.