GL Studio C++ Runtime API
GlsUnicodeFontDBUFReader Class Reference

#include <gls_unicode_font_base.h>

Public Member Functions

 GlsUnicodeFontDBUFReader (const unsigned char *const *inlineDBUFData, const unsigned int lineLength, const unsigned int totalInlineSize, const bool isCompressed, unsigned long uncompressedSize)
 
 GlsUnicodeFontDBUFReader (const unsigned char *const dbufData, const unsigned int dbufDataLength)
 
 ~GlsUnicodeFontDBUFReader ()
 
GlsFontBase::FontAttr_t GetGlsFontBaseFontAttributes (void)
 
GlsFontBase::AttrCont_t GetGlsFontBaseCharAttributes (void)
 
ImageGetGlsFontBaseTexture (void)
 
GlsUnicodeFontBase::FontAttrUnicode_t GetGlsUnicodeFontBaseFontAttributes (void)
 
GlsUnicodeFontBase::AttrContUnicode_t GetGlsUnicodeFontBaseCharAttributes (void)
 
std::vector< Image * > GetGlsUnicodeFontBaseTextures (void)
 
bool IsValid (void) const
 
std::string GetErrorMsg (void) const
 

Protected Member Functions

void InitializeFromDBUF (const unsigned char *const dbufData, const unsigned int dbufDataLength)
 

Protected Attributes

bool _isValid
 
std::string _errMsg
 
GlsUnicodeFontBase::FontAttrUnicode_t _fontAttrUnicode
 
GlsUnicodeFontBase::AttrContUnicode_t _charAttrUnicode
 
std::vector< Image * > _fontTextures
 

Detailed Description

helper class for reading a binary unicode font (DBUF)

Constructor & Destructor Documentation

GlsUnicodeFontDBUFReader ( const unsigned char *const *  inlineDBUFData,
const unsigned int  lineLength,
const unsigned int  totalInlineSize,
const bool  isCompressed,
unsigned long  uncompressedSize 
)

ctor – construct from inline data (optionally compressed)

Parameters
inlineDBUFDatainline DBUF data to read
lineLengthlength of lines in inline data
totalInlineSizetotal number of bytes (not including NULL terminators) of inline data
isCompressedtrue if dbuf data is zlib compressed else false
uncompressedSizeuncompressed size of data if isCompressed else ignored
GlsUnicodeFontDBUFReader ( const unsigned char *const  dbufData,
const unsigned int  dbufDataLength 
)

ctor – construct from noninline data (not compressed)

Parameters
dbufDataDBUF data to read
dbufDataLengthnumber of bytes of data in dbufData

Member Function Documentation

std::string GetErrorMsg ( void  ) const

Get an error message if !IsValid()

Returns
an error message if !IsValid()
GlsFontBase::AttrCont_t GetGlsFontBaseCharAttributes ( void  )

Get the GlsFontBase::AttrCont_t associated with the unicode font

Returns
the GlsFontBase::AttrCont_t associated with the unicode font
GlsFontBase::FontAttr_t GetGlsFontBaseFontAttributes ( void  )

Get the GlsFontBase::FontAttr_t associated with the unicode font

Returns
the GlsFontBase::FontAttr_t associated with the unicode font
Image* GetGlsFontBaseTexture ( void  )

Get the first image associated with the unicode font (suitable for use by GlsFontBase)

Returns
the first image associated with the unicode font (suitable for use by GlsFontBase)
Note
will increase usage count on texture by one so caller should call DeleteUsage when texture is no longer needed
GlsUnicodeFontBase::AttrContUnicode_t GetGlsUnicodeFontBaseCharAttributes ( void  )

Get the GlsUnicodeFontBase::AttrContUnicode_t associated with the unicode font

Returns
the GlsFontBase::AttrContUnicode_t associated with the unicode font
GlsUnicodeFontBase::FontAttrUnicode_t GetGlsUnicodeFontBaseFontAttributes ( void  )

Get the GlsUnicodeFontBase::FontAttrUnicode_t associated with the unicode font

Returns
the GlsFontBase::FontAttrUnicode_t associated with the unicode font
std::vector<Image*> GetGlsUnicodeFontBaseTextures ( void  )

Get the textures associated with the unicode font

Returns
the textures associated with the unicode font
Note
each texture will have its usage count increased by one so caller should call DeleteUsage on each texture when they are no longer needed
void InitializeFromDBUF ( const unsigned char *const  dbufData,
const unsigned int  dbufDataLength 
)
protected

initialize the reader from the given DBUF data

Parameters
dbufDataDBUF data to read
dbufDataLengthnumber of bytes of data in dbufData
bool IsValid ( void  ) const

Determine if a valid DBUF was read

Returns
true if a valid DBUF was read else false

Member Data Documentation

GlsUnicodeFontBase::AttrContUnicode_t _charAttrUnicode
protected

unicode char attributes read from DBUF data

std::string _errMsg
protected

error message if !IsValid()

GlsUnicodeFontBase::FontAttrUnicode_t _fontAttrUnicode
protected

unicode font attributes read from DBUF data

std::vector<Image*> _fontTextures
protected

font textures read from DBUF data

bool _isValid
protected

true if a valid DBUF was read else false


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