10#ifdef GUILIANI_STREAM_GUI
12#ifndef GUISTREAMREADER__H_
13#define GUISTREAMREADER__H_
22#include "eC_TArrayStack.h"
24#include "GUICommonTypes.h"
36#include "GUIStreamTypes.h"
39#define READ_BOOL(x) ReadBool(x)
41#define READ_UBYTE(x) ReadUByte(x)
43#define READ_SBYTE(x) ReadSByte(x)
45#define READ_SHORT(x) ReadShort(x)
47#define READ_USHORT(x) ReadUShort(x)
49#define READ_INT(x) ReadInt(x)
51#define READ_UINT(x) ReadUInt(x)
53#define READ_HEX(x) ReadHex(x)
55#define READ_COLOR(x) ReadColor(x)
57#define READ_FLOAT(x) ReadFloat(x)
59#define READ_STRING(x) ReadString(x)
61#define READ_BINARY(a, x) ReadBinary(a, x)
63#define DELETE_COMMENT_TAG(x) DeleteCommentTag(x)
65#define READ_OBJECTID(x) ReadObjectID(x)
67#define READ_IMAGEID(x) ReadImageID(x)
69#define READ_TEXTID(x) ReadTextID(x)
71#define READ_FONTID(x) ReadFontID(x)
73#define READ_SOUNDID(x) ReadSoundID(x)
75#define READ_GENRESID(x) ReadGeneralResourceID(x)
77#define READ_DATAPOOLID(x) ReadDataPoolID(x)
79#define READ_PROPERTYID(x) ReadPropertyID(x)
82#define GETINPUTSTREAM CGUIStreamReader::GetInstance()
87#define BUFFER_LENGTH 1024
174 virtual eC_UByte
ReadUByte(
const eC_Char* pcTag = NULL) = 0;
180 virtual eC_Byte
ReadByte(
const eC_Char* pcTag = NULL) = 0;
186 virtual eC_UInt
ReadUInt(
const eC_Char* pcTag = NULL) = 0;
192 virtual eC_Int
ReadInt(
const eC_Char* pcTag = NULL) = 0;
198 virtual eC_UInt
ReadHex(
const eC_Char* pcTag = NULL) = 0;
210 virtual eC_Float
ReadFloat(
const eC_Char* pcTag = NULL) = 0;
216 virtual eC_String
ReadString(
const eC_Char* pcTag = NULL) = 0;
222 virtual eC_UShort
ReadUShort(
const eC_Char* pcTag = NULL) = 0;
228 virtual eC_Short
ReadShort(
const eC_Char* pcTag = NULL) = 0;
234 virtual eC_Bool
ReadBool(
const eC_Char* pcTag = NULL) = 0;
240 virtual void ReadBinary(eC_TArray<eC_UByte>& aData,
const eC_Char* pcTag = NULL) = 0;
399 CGUIStreamReader(FileType_t eFileType, FileEndianess_t eFileEndianess, FileAlignment_t eFileAlignment);
Helper Macros in Guiliani
AnimationHandle_t
List of animation resource ids.
Definition: GUIAnimationResource.h:49
Helper Macros in Guiliani
Helper Macros in Guiliani
DataPoolResource_t
List of data pool resource ids.
Definition: GUIDataPoolResource.h:35
Helper Macros in Guiliani
FontResource_t
List of font resource ids.
Definition: GUIFontResource.h:54
Helper Macros in Guiliani
GeneralResource_t
List of general resource ids.
Definition: GUIGeneralResource.h:52
Helper Macros in Guiliani
ImageResource_t
Enumeration of image resource ids.
Definition: GUIImageResource.h:126
Helper Macros in Guiliani
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Helper Macros in Guiliani
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
Helper Macros in Guiliani
SoundResource_t
List of sound resource ids.
Definition: GUISoundResource.h:48
#define READ_INT(x)
Helper macro that should be used instead of calling CGUIStreamReader::ReadInt().
Definition: GUIStreamReader.h:49
Helper Macros in Guiliani
TextResource_t
List of text resource ids.
Definition: GUITextResource.h:40
Base class for stream readers.
Definition: GUIStreamReader.h:127
virtual TextResource_t ReadTextID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:267
void ResizeReadBuffer(eC_Bool bReset)
eC_String GetLastReadTag() const
Definition: GUIStreamReader.h:386
eC_File * m_pkCurrentInputFile
Pointer to the current streaming file. All reading operations will be performed on this file.
Definition: GUIStreamReader.h:411
virtual FontResource_t ReadFontID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:277
eC_UInt GetCurLine() const
Definition: GUIStreamReader.h:337
eC_UInt m_uiCurLine
Line number in current streaming file.
Definition: GUIStreamReader.h:417
virtual const eC_String & GetFileSuffix() const
void SetStreamingFile(eC_File *pkStreamingFile)
virtual eC_Int ReadStreamingFileHeader()=0
virtual void DeleteCommentTag(const eC_String &kTag)=0
virtual eC_Short ReadShort(const eC_Char *pcTag=NULL)=0
FileEndianess_t m_eFileEndianess
Endianess of the file.
Definition: GUIStreamReader.h:423
static void CreateInstance()
virtual eC_Byte ReadByte(const eC_Char *pcTag=NULL)=0
eC_TArray< eC_Char > m_aReadBuffer
Dynamic array to hold currently read tag content.
Definition: GUIStreamReader.h:414
virtual ColorValue_t ReadColor(const eC_Char *pcTag=NULL)=0
virtual eC_UInt ReadHex(const eC_Char *pcTag=NULL)=0
virtual void ReadBinary(eC_TArray< eC_UByte > &aData, const eC_Char *pcTag=NULL)=0
eC_String m_kLastReadTag
Last tag which was read, used to skip to the end of an corrupted object.
Definition: GUIStreamReader.h:429
static void DeleteInstance()
static CGUIStreamReader & GetInstance()
virtual eC_Int ReadInt(const eC_Char *pcTag=NULL)=0
FileType_t GetFileType() const
Definition: GUIStreamReader.h:370
virtual void DeleteCommentTag(const eC_Char *pcTag=NULL)=0
virtual AnimationHandle_t ReadAnimationChainID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:329
void ResetStreamingFile()
virtual ~CGUIStreamReader()
virtual DataPoolResource_t ReadDataPoolID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:309
virtual eC_Float ReadFloat(const eC_Char *pcTag=NULL)=0
virtual eC_Bool ReadBool(const eC_Char *pcTag=NULL)=0
FileAlignment_t m_eFileAlignment
Alignment of the file.
Definition: GUIStreamReader.h:426
FileAlignment_t GetFileAlignment() const
Definition: GUIStreamReader.h:378
virtual SoundResource_t ReadSoundID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:287
CGUIStreamReader(FileType_t eFileType, FileEndianess_t eFileEndianess, FileAlignment_t eFileAlignment)
virtual eC_UByte ReadUByte(const eC_Char *pcTag=NULL)=0
virtual eC_String ReadString(const eC_Char *pcTag=NULL)=0
virtual eC_UShort ReadUShort(const eC_Char *pcTag=NULL)=0
FileType_t m_eFileType
File Type.
Definition: GUIStreamReader.h:420
virtual ImageResource_t ReadImageID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:257
virtual GeneralResource_t ReadGeneralResourceID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:299
FileEndianess_t GetFileEndianess() const
Definition: GUIStreamReader.h:362
virtual GlobalProperty_t ReadPropertyID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:319
virtual eC_UInt ReadUInt(const eC_Char *pcTag=NULL)=0
virtual ObjectHandle_t ReadObjectID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:247
virtual CGUIStreamReader * Clone() const =0
structure used to stream colors
Definition: GUICommonTypes.h:24