Reads streaming files written by CGUIStreamWriterXML. More...
#include <GUIStreamReaderXML.h>
Public Member Functions | |
virtual CGUIStreamReader * | Clone () const |
virtual void | DeleteCommentTag (const eC_Char *pcTag=NULL) |
virtual void | DeleteCommentTag (const eC_String &kString) |
virtual const eC_String & | GetFileSuffix () const |
virtual void | ReadBinary (eC_TArray< eC_UByte > &aData, const eC_Char *pcTag=NULL) |
virtual eC_Bool | ReadBool (const eC_Char *pcTag=NULL) |
virtual eC_Byte | ReadByte (const eC_Char *pcTag=NULL) |
virtual ColorValue_t | ReadColor (const eC_Char *pcTag=NULL) |
virtual eC_Float | ReadFloat (const eC_Char *pcTag=NULL) |
virtual eC_UInt | ReadHex (const eC_Char *pcTag=NULL) |
virtual eC_Int | ReadInt (const eC_Char *pcTag=NULL) |
virtual eC_Short | ReadShort (const eC_Char *pcTag=NULL) |
virtual eC_Int | ReadStreamingFileHeader () |
virtual eC_String | ReadString (const eC_Char *pcTag=NULL) |
virtual eC_UByte | ReadUByte (const eC_Char *pcTag=NULL) |
virtual eC_UInt | ReadUInt (const eC_Char *pcTag=NULL) |
virtual eC_UShort | ReadUShort (const eC_Char *pcTag=NULL) |
![]() | |
virtual | ~CGUIStreamReader () |
virtual CGUIStreamReader * | Clone () const =0 |
virtual void | DeleteCommentTag (const eC_Char *pcTag=NULL)=0 |
virtual void | DeleteCommentTag (const eC_String &kTag)=0 |
eC_UInt | GetCurLine () const |
FileAlignment_t | GetFileAlignment () const |
FileEndianess_t | GetFileEndianess () const |
virtual const eC_String & | GetFileSuffix () const |
FileType_t | GetFileType () const |
eC_String | GetLastReadTag () const |
virtual AnimationHandle_t | ReadAnimationChainID (const eC_Char *pcTag=NULL) |
virtual void | ReadBinary (eC_TArray< eC_UByte > &aData, const eC_Char *pcTag=NULL)=0 |
virtual eC_Bool | ReadBool (const eC_Char *pcTag=NULL)=0 |
virtual eC_Byte | ReadByte (const eC_Char *pcTag=NULL)=0 |
virtual ColorValue_t | ReadColor (const eC_Char *pcTag=NULL)=0 |
virtual DataPoolResource_t | ReadDataPoolID (const eC_Char *pcTag=NULL) |
virtual eC_Float | ReadFloat (const eC_Char *pcTag=NULL)=0 |
virtual FontResource_t | ReadFontID (const eC_Char *pcTag=NULL) |
virtual GeneralResource_t | ReadGeneralResourceID (const eC_Char *pcTag=NULL) |
virtual eC_UInt | ReadHex (const eC_Char *pcTag=NULL)=0 |
virtual ImageResource_t | ReadImageID (const eC_Char *pcTag=NULL) |
virtual eC_Int | ReadInt (const eC_Char *pcTag=NULL)=0 |
virtual ObjectHandle_t | ReadObjectID (const eC_Char *pcTag=NULL) |
virtual GlobalProperty_t | ReadPropertyID (const eC_Char *pcTag=NULL) |
virtual eC_Short | ReadShort (const eC_Char *pcTag=NULL)=0 |
virtual SoundResource_t | ReadSoundID (const eC_Char *pcTag=NULL) |
virtual eC_Int | ReadStreamingFileHeader ()=0 |
virtual eC_String | ReadString (const eC_Char *pcTag=NULL)=0 |
virtual TextResource_t | ReadTextID (const eC_Char *pcTag=NULL) |
virtual eC_UByte | ReadUByte (const eC_Char *pcTag=NULL)=0 |
virtual eC_UInt | ReadUInt (const eC_Char *pcTag=NULL)=0 |
virtual eC_UShort | ReadUShort (const eC_Char *pcTag=NULL)=0 |
virtual UUID_t | ReadUUID (const eC_Char *pcTag=NULL) |
void | ResetStreamingFile () |
void | SetStreamingFile (eC_File *pkStreamingFile) |
Additional Inherited Members | |
![]() | |
static void | CreateInstance () |
static void | DeleteInstance () |
static CGUIStreamReader & | GetInstance () |
![]() | |
CGUIStreamReader (FileType_t eFileType, FileEndianess_t eFileEndianess, FileAlignment_t eFileAlignment) | |
void | ResizeReadBuffer (eC_Bool bReset) |
![]() | |
eC_TArray< eC_Char > | m_aReadBuffer |
Dynamic array to hold currently read tag content. | |
FileAlignment_t | m_eFileAlignment |
Alignment of the file. | |
FileEndianess_t | m_eFileEndianess |
Endianess of the file. | |
FileType_t | m_eFileType |
File Type. | |
eC_String | m_kLastReadTag |
Last tag which was read, used to skip to the end of an corrupted object. | |
eC_File * | m_pkCurrentInputFile |
Pointer to the current streaming file. All reading operations will be performed on this file. | |
eC_UInt | m_uiCurLine |
Line number in current streaming file. | |
Reads streaming files written by CGUIStreamWriterXML.
This implementation has the ability to compare each tag that was read with the expected tag. Each of the read methods performs a check for the correct tag and throws a CGUIStreamingException if the tags do not match.
To prevent checking of tags, e.g. when the tag is not necessary to be known, just provide an empty string. This will de-activate this check.
If performance in production scenarios is needed the StreamReaderXML might not be the best choice, since it generates lot of overhead for the human-readable file-content and integrity checks. If performance is of the essence the StreamReaderBinary should be used instead.
The ReadString() implementation unescapes XML predefined entities. See StringOperations::UnescapeXML() for details.
|
virtual |
Implements CGUIStreamReader.
|
virtual |
Reads over (removes) a tag from the current streaming file without reading a value.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads over (removes) a tag from the current streaming file without reading a value.
kTag | descriptive tag. |
Implements CGUIStreamReader.
|
inlinevirtual |
Returns the file suffix which is associated with this reader's file format. This can be an empty string, if e.g. the reader works with formats which are unrelated to files.
Reimplemented from CGUIStreamReader.
|
virtual |
Reads binary stream. Array will be retrieved from stream in raw mode.
pcTag | Optional descriptive tag. | |
[out] | aData | Array the read data will be set to. |
Implements CGUIStreamReader.
|
virtual |
Reads a boolean value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads a signed byte value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads a color from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads a float value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads a hexadecimal integer value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads a signed integer value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads a short value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
inlinevirtual |
|
virtual |
Reads a string from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads an unsigned byte value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads an unsigned integer value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.
|
virtual |
Reads an unsigned short value from the current streaming file.
pcTag | Optional descriptive tag. |
Implements CGUIStreamReader.