Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

CFontManager Class Reference

Animation Manager class. More...

#include <FontManager.h>

Inheritance diagram for CFontManager:

CResourceManager CSingleton< CFontManager > CDoubleList< CXMLResource * > CXMLResource CResource CEntity List of all members.

Public Member Functions

virtual CCustomFontLoadResource (TiXmlNode *pDataNode, CString strFilename, UINT uiID=0, CString strName="")
virtual CCustomFontGetResource (int uiIndex, int uiID=-1, CString strName="", CString strFilename="")
virtual CCustomFontAddResource (CString strName, UINT uiID=0, eEntityType ResourceType=Entity_Default)
int RemoveResource (CCustomFont *pFont)
virtual int LoadXML (TiXmlNode *pDataNode, CString strFilename)
virtual int SaveXML (TiXmlNode *pDataNode, CString strFilename)
virtual void Destroy ()
virtual bool IsOfType (eEntityType eType)

Detailed Description

Animation Manager class.

This class provides means to managing various fonts (Bitmap or others). It manages a collection of fonts (although not pooled yet!) and allow to retrieve them by index, name, ID or filename.

Definition at line 14 of file FontManager.h.


Member Function Documentation

CCustomFont * CFontManager::AddResource CString  strName,
UINT  uiID = 0,
eEntityType  ResourceType = Entity_Default
[virtual]
 

Method details:

Parameters:
strName - Name of the font to add
uiID - ID of the font to add
ResourceType - Type of the font to add
Returns:
Pointer to the font if it has been added succesfully using given parameters, NULL if not

Reimplemented from CResourceManager.

Definition at line 16 of file FontManager.cpp.

References CDoubleList< CXMLResource * >::push_back(), CEntity::SetID(), and CEntity::SetName().

void CFontManager::Destroy  )  [virtual]
 

Method details: This is where clean-up occurs

Reimplemented from CResourceManager.

Definition at line 242 of file FontManager.cpp.

References CDoubleList< CXMLResource * >::begin(), CResourceManager::Destroy(), CCustomFont::GetFontType(), CEntity::GetID(), CGlobalLogger::GetLogLevel(), CEntity::GetName(), CSingleton< CGlobalLogger >::GetSingleton(), CDoubleList< CXMLResource * >::next(), CDoubleList< CXMLResource * >::set_ptr(), CDoubleList< CXMLResource * >::size(), and CLogger::Write().

CCustomFont * CFontManager::GetResource int  uiIndex,
int  uiID = -1,
CString  strName = "",
CString  strFilename = ""
[virtual]
 

Method details:

Parameters:
uiIndex - Index by which to retrieve the font
uiID - ID by which to retrieve the font
strName - Name by which to retrieve the font
strFilename - Filename by which to retrieve the font
Returns:
Pointer to the font if it has been found using given parameters, NULL if not

Reimplemented from CResourceManager.

Definition at line 186 of file FontManager.cpp.

References CDoubleList< CXMLResource * >::at(), CDoubleList< CXMLResource * >::begin(), CXMLResource::GetFilename(), CEntity::GetID(), CEntity::GetName(), CDoubleList< CXMLResource * >::next(), CDoubleList< CXMLResource * >::set_ptr(), and CDoubleList< CXMLResource * >::size().

Referenced by LoadResource(), and CGUIStatic::PropertyChanging().

bool CFontManager::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CResourceManager.

Definition at line 266 of file FontManager.cpp.

References CResourceManager::IsOfType().

CCustomFont * CFontManager::LoadResource TiXmlNode pDataNode,
CString  strFilename,
UINT  uiID = 0,
CString  strName = ""
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Data node containing data for the font
strFilename - Name of the file containing data for the font
uiID - ID for the font to be loaded
strName - Name for the font to be loaded
Returns:
Pointer to the font if it has been loaded succesfully, NULL if not

Implements CResourceManager.

Definition at line 119 of file FontManager.cpp.

References TiXmlElement::Attribute(), CEntity::GetID(), CEntity::GetName(), GetResource(), CCustomFont::LoadXML(), CDoubleList< CXMLResource * >::push_back(), CEntity::SetID(), CEntity::SetName(), and TiXmlNode::ToElement().

Referenced by CGUIStatic::LoadXML(), and LoadXML().

int CFontManager::LoadXML TiXmlNode pDataNode,
CString  strFilename
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Node that holds data for this texture
strFilename - String containing filename where the data for the font is stored

Reimplemented from CResourceManager.

Definition at line 37 of file FontManager.cpp.

References TiXmlNode::FirstChild(), CEntity::GetID(), CEntity::GetName(), CSingleton< CGlobalLogger >::GetSingleton(), TiXmlNode::IterateChildren(), LoadResource(), CResourceManager::LoadXML(), TiXmlNode::pcValue(), and CLogger::Write().

int CFontManager::RemoveResource CCustomFont pFont  ) 
 

Method details:

Parameters:
pResource - Pointer to the font to remove
Returns:
1 if it has been found and removed succesfully, 0 otherwise
Definition at line 236 of file FontManager.cpp.

int CFontManager::SaveXML TiXmlNode pDataNode,
CString  strFilename
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Node that will be the parent hold the data for this texture
strFilename - String containing filename where the data for the font is stored

Reimplemented from CResourceManager.

Definition at line 80 of file FontManager.cpp.

References CDoubleList< CXMLResource * >::begin(), TiXmlNode::InsertEndChild(), CDoubleList< CXMLResource * >::next(), TiXmlDocument::SaveFile(), CCustomFont::SaveXML(), CDoubleList< CXMLResource * >::set_ptr(), and TiXmlNode::ToElement().


The documentation for this class was generated from the following files:
Generated on Sun Jul 17 21:34:29 2005 for OpenGL GUI by doxygen 1.3.8