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)
81#define READ_UUID(x) ReadUUID(x)
84#define GETINPUTSTREAM CGUIStreamReader::GetInstance()
89#define BUFFER_LENGTH 1024
176 virtual eC_UByte
ReadUByte(
const eC_Char* pcTag = NULL) = 0;
182 virtual eC_Byte
ReadByte(
const eC_Char* pcTag = NULL) = 0;
188 virtual eC_UInt
ReadUInt(
const eC_Char* pcTag = NULL) = 0;
194 virtual eC_Int
ReadInt(
const eC_Char* pcTag = NULL) = 0;
200 virtual eC_UInt
ReadHex(
const eC_Char* pcTag = NULL) = 0;
212 virtual eC_Float
ReadFloat(
const eC_Char* pcTag = NULL) = 0;
218 virtual eC_String
ReadString(
const eC_Char* pcTag = NULL) = 0;
224 virtual eC_UShort
ReadUShort(
const eC_Char* pcTag = NULL) = 0;
230 virtual eC_Short
ReadShort(
const eC_Char* pcTag = NULL) = 0;
236 virtual eC_Bool
ReadBool(
const eC_Char* pcTag = NULL) = 0;
242 virtual void ReadBinary(eC_TArray<eC_UByte>& aData,
const eC_Char* pcTag = NULL) = 0;
410 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:129
virtual TextResource_t ReadTextID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:269
void ResizeReadBuffer(eC_Bool bReset)
eC_String GetLastReadTag() const
Definition: GUIStreamReader.h:397
eC_File * m_pkCurrentInputFile
Pointer to the current streaming file. All reading operations will be performed on this file.
Definition: GUIStreamReader.h:422
virtual FontResource_t ReadFontID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:279
eC_UInt GetCurLine() const
Definition: GUIStreamReader.h:348
eC_UInt m_uiCurLine
Line number in current streaming file.
Definition: GUIStreamReader.h:428
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
virtual UUID_t ReadUUID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:340
FileEndianess_t m_eFileEndianess
Endianess of the file.
Definition: GUIStreamReader.h:434
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:425
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:440
static void DeleteInstance()
static CGUIStreamReader & GetInstance()
virtual eC_Int ReadInt(const eC_Char *pcTag=NULL)=0
FileType_t GetFileType() const
Definition: GUIStreamReader.h:381
virtual void DeleteCommentTag(const eC_Char *pcTag=NULL)=0
virtual AnimationHandle_t ReadAnimationChainID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:331
void ResetStreamingFile()
virtual ~CGUIStreamReader()
virtual DataPoolResource_t ReadDataPoolID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:311
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:437
FileAlignment_t GetFileAlignment() const
Definition: GUIStreamReader.h:389
virtual SoundResource_t ReadSoundID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:289
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:431
virtual ImageResource_t ReadImageID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:259
virtual GeneralResource_t ReadGeneralResourceID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:301
FileEndianess_t GetFileEndianess() const
Definition: GUIStreamReader.h:373
virtual GlobalProperty_t ReadPropertyID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:321
virtual eC_UInt ReadUInt(const eC_Char *pcTag=NULL)=0
virtual ObjectHandle_t ReadObjectID(const eC_Char *pcTag=NULL)
Definition: GUIStreamReader.h:249
virtual CGUIStreamReader * Clone() const =0
structure used to stream colors
Definition: GUICommonTypes.h:24
Definition: GUIStreamTypes.h:43