Guiliani  Version 2.6 revision 7293 (documentation build 12)
CGUIStreamReaderBinary Class Reference

Reads streaming files written by CGUIStreamWriterBinary. More...

#include <GUIStreamReaderBinary.h>

Inheritance diagram for CGUIStreamReaderBinary:

Public Member Functions

 CGUIStreamReaderBinary ()
 Constructor.
 
virtual CGUIStreamReaderClone () const
 
void DeleteCommentTag (const eC_Char *pcTag=NULL)
 
void DeleteCommentTag (const eC_String &kTag)
 
virtual const eC_String & GetFileSuffix () const
 
void ReadBinary (eC_TArray< eC_UByte > &aData, const eC_Char *pcTag=NULL)
 
eC_Bool ReadBool (const eC_Char *pcTag=NULL)
 
eC_Byte ReadByte (const eC_Char *pcTag=NULL)
 
ColorValue_t ReadColor (const eC_Char *pcTag=NULL)
 
eC_Float ReadFloat (const eC_Char *pcTag=NULL)
 
eC_UInt ReadHex (const eC_Char *pcTag=NULL)
 
eC_Int ReadInt (const eC_Char *pcTag=NULL)
 
eC_Short ReadShort (const eC_Char *pcTag=NULL)
 
eC_Int ReadStreamingFileHeader ()
 
eC_String ReadString (const eC_Char *pcTag=NULL)
 
eC_UByte ReadUByte (const eC_Char *pcTag=NULL)
 
eC_UInt ReadUInt (const eC_Char *pcTag=NULL)
 
eC_UShort ReadUShort (const eC_Char *pcTag=NULL)
 
- Public Member Functions inherited from CGUIStreamReader
virtual ~CGUIStreamReader ()
 
virtual CGUIStreamReaderClone () 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)
 

Protected Member Functions

 CGUIStreamReaderBinary (const CGUIStreamReaderBinary &kSource)
 
CGUIStreamReaderBinaryoperator= (const CGUIStreamReaderBinary &kSource)
 
void ReadPadding (eC_UInt uiBytesRead)
 
eC_Bool SetFileAlignment (FileAlignment_t eFileAlignment)
 
eC_Bool SetFileEndianess (FileEndianess_t eFileEndianess)
 
- Protected Member Functions inherited from CGUIStreamReader
 CGUIStreamReader (FileType_t eFileType, FileEndianess_t eFileEndianess, FileAlignment_t eFileAlignment)
 
void ResizeReadBuffer (eC_Bool bReset)
 

Additional Inherited Members

- Static Public Member Functions inherited from CGUIStreamReader
static void CreateInstance ()
 
static void DeleteInstance ()
 
static CGUIStreamReaderGetInstance ()
 
- Protected Attributes inherited from CGUIStreamReader
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.
 

Detailed Description

Reads streaming files written by CGUIStreamWriterBinary.

Since CGUIStreamWriterBinary does not write the descriptive tags, each of the read methods in this implementation ignores the tag.

Constructor & Destructor Documentation

◆ CGUIStreamReaderBinary()

CGUIStreamReaderBinary::CGUIStreamReaderBinary ( const CGUIStreamReaderBinary kSource)
protected

This prototype is declared only to prevent auto-generation by the compiler. There is no implementation for this method.

Parameters
kSourceUnused

Member Function Documentation

◆ Clone()

virtual CGUIStreamReader * CGUIStreamReaderBinary::Clone ( ) const
virtual
Returns
clone stream-reader

Implements CGUIStreamReader.

◆ DeleteCommentTag() [1/2]

void CGUIStreamReaderBinary::DeleteCommentTag ( const eC_Char *  pcTag = NULL)
virtual

Reads over (removes) a tag from the current streaming file without reading a value.

Parameters
pcTagOptional descriptive tag.

Implements CGUIStreamReader.

◆ DeleteCommentTag() [2/2]

void CGUIStreamReaderBinary::DeleteCommentTag ( const eC_String &  kTag)
virtual

Reads over (removes) a tag from the current streaming file without reading a value.

Parameters
kTagdescriptive tag.

Implements CGUIStreamReader.

◆ GetFileSuffix()

virtual const eC_String & CGUIStreamReaderBinary::GetFileSuffix ( ) const
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.

Returns
String with the associated file suffix (e.g. ".xml")

Reimplemented from CGUIStreamReader.

◆ operator=()

CGUIStreamReaderBinary & CGUIStreamReaderBinary::operator= ( const CGUIStreamReaderBinary kSource)
protected

This prototype is declared only to prevent auto-generation by the compiler. There is no implementation for this method.

Parameters
kSourceUnused
Returns
Unused

◆ ReadBinary()

void CGUIStreamReaderBinary::ReadBinary ( eC_TArray< eC_UByte > &  aData,
const eC_Char *  pcTag = NULL 
)
virtual

Reads binary stream. Array will be retrieved from stream in raw mode.

Parameters
pcTagOptional descriptive tag.
[out]aDataArray the read data will be set to.

Implements CGUIStreamReader.

◆ ReadBool()

eC_Bool CGUIStreamReaderBinary::ReadBool ( const eC_Char *  pcTag = NULL)
virtual

Reads a boolean value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadByte()

eC_Byte CGUIStreamReaderBinary::ReadByte ( const eC_Char *  pcTag = NULL)
virtual

Reads a signed byte value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadColor()

ColorValue_t CGUIStreamReaderBinary::ReadColor ( const eC_Char *  pcTag = NULL)
virtual

Reads a color from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadFloat()

eC_Float CGUIStreamReaderBinary::ReadFloat ( const eC_Char *  pcTag = NULL)
virtual

Reads a float value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadHex()

eC_UInt CGUIStreamReaderBinary::ReadHex ( const eC_Char *  pcTag = NULL)
virtual

Reads a hexadecimal integer value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadInt()

eC_Int CGUIStreamReaderBinary::ReadInt ( const eC_Char *  pcTag = NULL)
virtual

Reads a signed integer value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadPadding()

void CGUIStreamReaderBinary::ReadPadding ( eC_UInt  uiBytesRead)
protected

Reads and discards pad bytes out of the stream file to match alignment.

Parameters
uiBytesReadBytes read with last operation

◆ ReadShort()

eC_Short CGUIStreamReaderBinary::ReadShort ( const eC_Char *  pcTag = NULL)
virtual

Reads a short value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadStreamingFileHeader()

eC_Int CGUIStreamReaderBinary::ReadStreamingFileHeader ( )
virtual

Reads the file header and returns the file version.

Returns
file version

Implements CGUIStreamReader.

◆ ReadString()

eC_String CGUIStreamReaderBinary::ReadString ( const eC_Char *  pcTag = NULL)
virtual

Reads a string from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The string that has been read.

Implements CGUIStreamReader.

◆ ReadUByte()

eC_UByte CGUIStreamReaderBinary::ReadUByte ( const eC_Char *  pcTag = NULL)
virtual

Reads an unsigned byte value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadUInt()

eC_UInt CGUIStreamReaderBinary::ReadUInt ( const eC_Char *  pcTag = NULL)
virtual

Reads an unsigned integer value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ ReadUShort()

eC_UShort CGUIStreamReaderBinary::ReadUShort ( const eC_Char *  pcTag = NULL)
virtual

Reads an unsigned short value from the current streaming file.

Parameters
pcTagOptional descriptive tag.
Returns
The value read from the file.

Implements CGUIStreamReader.

◆ SetFileAlignment()

eC_Bool CGUIStreamReaderBinary::SetFileAlignment ( FileAlignment_t  eFileAlignment)
protected

Sets the alignment of the streamed file.

Parameters
eFileAlignmentthe desired alignment
Return values
trueoperation successful
falseoperation not supported

◆ SetFileEndianess()

eC_Bool CGUIStreamReaderBinary::SetFileEndianess ( FileEndianess_t  eFileEndianess)
protected

Sets the endianess of the streamed file.

Parameters
eFileEndianessthe desired endianess
Return values
trueoperation successful
falseoperation not supported

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