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

CAnimationManager Class Reference

Animation Manager class. More...

#include <AnimationManager.h>

Inheritance diagram for CAnimationManager:

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

Public Member Functions

virtual CAnimationLoadResource (TiXmlNode *pDataNode, CString strFilename, UINT uiID=0, CString strName="")
virtual CAnimationGetResource (int uiIndex, int uiID=-1, CString strName="", CString strFilename="")
virtual CAnimationAddResource (CString strName, UINT uiID=0, eEntityType ResourceType=Entity_Default)
int RemoveResource (CAnimation *pAnimation)
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 animations. It manages a collection of animations (although not pooled yet!) and allow to retrieve them by index, name, ID or filename.

Definition at line 15 of file AnimationManager.h.


Member Function Documentation

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

Method details:

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

Reimplemented from CResourceManager.

Definition at line 98 of file AnimationManager.cpp.

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

void CAnimationManager::Destroy  )  [virtual]
 

Method details: This is where clean-up occurs

Reimplemented from CResourceManager.

Definition at line 248 of file AnimationManager.cpp.

References CResourceManager::Destroy().

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

Method details:

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

Reimplemented from CResourceManager.

Definition at line 193 of file AnimationManager.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 CGUIButton::PropertyChanging().

bool CAnimationManager::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CResourceManager.

Definition at line 253 of file AnimationManager.cpp.

References CResourceManager::IsOfType().

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

Method details:

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

Implements CResourceManager.

Definition at line 120 of file AnimationManager.cpp.

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

Referenced by CGUIButton::LoadStateEvents(), and LoadXML().

int CAnimationManager::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 animation is stored

Reimplemented from CResourceManager.

Definition at line 16 of file AnimationManager.cpp.

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

int CAnimationManager::RemoveResource CAnimation pAnimation  ) 
 

Method details:

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

int CAnimationManager::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 animation is stored

Reimplemented from CResourceManager.

Definition at line 59 of file AnimationManager.cpp.

References CDoubleList< CXMLResource * >::begin(), TiXmlNode::InsertEndChild(), CDoubleList< CXMLResource * >::next(), TiXmlDocument::SaveFile(), CAnimation::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