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

CXMLResource Class Reference

XML Resource class. More...

#include <XMLResource.h>

Inheritance diagram for CXMLResource:

CResource CEntity CAnimation CCustomFont CGUIElement CMaterial CResourceManager CTexture CFrameAnimation< TAnimation > CFrameAnimation< tRect > CBitmapFont CGUI CGUIBorder CGUIListBox CGUIStatic CGUIWindow COpenGLMaterial CAnimationManager CFontManager CMaterialManager CTextureManager COpenGLTexture List of all members.

Public Member Functions

virtual int LoadXML (TiXmlNode *pDataNode, CString strFilename)
virtual int SaveXML (TiXmlNode *pDataNode, CString strFilename)
virtual void Destroy ()
CString GetFilename ()
virtual bool IsOfType (eEntityType eType)
virtual bool PropertyChanging (const void *pvProperty, void *pvNewValue)
virtual void GetProperties (EPropList &PropList)

Protected Member Functions

void SetFilename (CString strFilename)

Protected Attributes

TiXmlElementm_pXMLElement
CString m_strFilename

Detailed Description

XML Resource class.

This class serves as a provider for resources that are loaded from XML file.

Definition at line 17 of file XMLResource.h.


Member Function Documentation

void CXMLResource::Destroy  )  [virtual]
 

Method details: Clean-up occurs here

Implements CResource.

Reimplemented in CAnimation, CAnimationManager, CBitmapFont, CCustomFont, CFontManager, CFrameAnimation< TAnimation >, CGUIElement, CGUI, CGUIStatic, CGUITextBox, CGUIButton, CGUIMenuEntry, CMaterial, CMaterialManager, COpenGLMaterial, COpenGLTexture, CResourceManager, CTexture, CTextureFrameAnimation, CTextureManager, and CFrameAnimation< tRect >.

Definition at line 109 of file XMLResource.cpp.

References TiXmlNode::Clear(), and m_pXMLElement.

Referenced by CResourceManager::Destroy(), and CAnimation::Destroy().

CString CXMLResource::GetFilename  ) 
 

Method details:

Returns:
File name for this XML resource
Definition at line 20 of file XMLResource.cpp.

References m_strFilename.

Referenced by CResourceManager::GetResource(), CMaterialManager::GetResource(), CFontManager::GetResource(), CAnimationManager::GetResource(), and CGUIBorder::SaveXML().

void CXMLResource::GetProperties EPropList &  PropList  )  [virtual]
 

Method details:

Parameters:
PropList - Const. reference to the property list

Reimplemented from CEntity.

Reimplemented in CGUIElement, CGUI, CGUIBorder, CGUIStatic, CGUIButton, CGUIScrollBar, CGUIProgressBar, CGUIDropList, CGUIListBox, CGUIMenuEntry, CGUIMenu, CGUIRadioGroup, and CGUITabControl.

Definition at line 101 of file XMLResource.cpp.

References CEntity::GetProperties(), and m_strFilename.

Referenced by CGUIElement::GetProperties().

bool CXMLResource::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CResource.

Reimplemented in CAnimation, CAnimationManager, CBitmapFont, CCustomFont, CFontManager, CFrameAnimation< TAnimation >, CGUIElement, CGUI, CGUIBorder, CGUIStatic, CGUITextBox, CGUIButton, CGUIScrollBar, CGUIProgressBar, CGUIDropList, CGUIListBox, CGUIMenuEntry, CGUIMenu, CGUIRadioGroup, CGUITabControl, CGUIWindow, CMaterial, CMaterialManager, COpenGLMaterial, COpenGLTexture, CResourceManager, CTexture, CTextureFrameAnimation, CTextureManager, and CFrameAnimation< tRect >.

Definition at line 118 of file XMLResource.cpp.

References CResource::IsOfType().

Referenced by CTexture::IsOfType(), CResourceManager::IsOfType(), COpenGLMaterial::IsOfType(), CMaterial::IsOfType(), CGUIElement::IsOfType(), CCustomFont::IsOfType(), and CAnimation::IsOfType().

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

Method details:

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

Reimplemented in CAnimation, CAnimationManager, CBitmapFont, CCustomFont, CFontManager, CFrameAnimation< TAnimation >, CGUIElement, CGUI, CGUIBorder, CGUIStatic, CGUITextBox, CGUIButton, CGUIScrollBar, CGUIProgressBar, CGUIDropList, CGUIListBox, CGUIMenuEntry, CGUIMenu, CGUIRadioGroup, CGUITabControl, CGUIWindow, CMaterial, CMaterialManager, COpenGLMaterial, COpenGLTexture, CResourceManager, CTexture, CTextureFrameAnimation, CTextureManager, and CFrameAnimation< tRect >.

Definition at line 25 of file XMLResource.cpp.

References TiXmlElement::Attribute(), TiXmlElement::Clone(), TiXmlNode::Clone(), TiXmlNode::FirstChild(), TiXmlDocument::LoadFile(), m_pXMLElement, m_strFilename, CEntity::SetID(), CEntity::SetName(), and TiXmlNode::ToElement().

Referenced by CTexture::LoadXML(), CResourceManager::LoadXML(), CMaterial::LoadXML(), CGUIElement::LoadXML(), CCustomFont::LoadXML(), and CAnimation::LoadXML().

bool CXMLResource::PropertyChanging const void *  pvProperty,
void *  pvNewValue
[virtual]
 

Method details:

Parameters:
pvProperty - Pointer to the property
pvNewValue - Pointer to the new value

Reimplemented from CEntity.

Reimplemented in CGUIElement, CGUI, CGUIBorder, CGUIStatic, CGUIButton, CGUIScrollBar, CGUIProgressBar, CGUIDropList, CGUIListBox, CGUIMenuEntry, CGUIMenu, CGUIRadioGroup, and CGUITabControl.

Definition at line 94 of file XMLResource.cpp.

References CEntity::PropertyChanging().

Referenced by CGUIElement::PropertyChanging().

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

Method details:

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

Reimplemented in CAnimation, CAnimationManager, CBitmapFont, CCustomFont, CFontManager, CFrameAnimation< TAnimation >, CGUIElement, CGUI, CGUIBorder, CGUIStatic, CGUITextBox, CGUIButton, CGUIScrollBar, CGUIProgressBar, CGUIDropList, CGUIListBox, CGUIMenuEntry, CGUIMenu, CGUIRadioGroup, CGUITabControl, CGUIWindow, CMaterial, CMaterialManager, COpenGLMaterial, COpenGLTexture, CResourceManager, CTexture, CTextureFrameAnimation, CTextureManager, and CFrameAnimation< tRect >.

Definition at line 88 of file XMLResource.cpp.

Referenced by CCustomFont::SaveXML().

void CXMLResource::SetFilename CString  strFilename  )  [protected]
 

Method details:

Parameters:
strFilename - Sets filename for this XML resource
Definition at line 15 of file XMLResource.cpp.

References m_strFilename.


Member Data Documentation

TiXmlElement* CXMLResource::m_pXMLElement [protected]
 

Pointer to XML element holding data for this XML resource Definition at line 69 of file XMLResource.h.

Referenced by Destroy(), and LoadXML().

CString CXMLResource::m_strFilename [protected]
 

Filename of this resource (external) Definition at line 70 of file XMLResource.h.

Referenced by GetFilename(), GetProperties(), LoadXML(), and SetFilename().


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