00001 #ifndef RESOURCEMANAGER_H 00002 #define RESOURCEMANAGER_H 00003 00004 #pragma once 00005 00006 #include "XMLResource.h" 00007 #include "DoubleList.h" 00008 00010 00015 class CResourceManager : public CDoubleList<CXMLResource *>, public CXMLResource 00016 { 00017 public: 00018 CResourceManager(); 00019 virtual ~CResourceManager(); 00020 00021 public: 00030 virtual CXMLResource *LoadResource(TiXmlNode *pDataNode, CString strFilename, UINT uiID = 0, CString strName = "") = 0; 00039 virtual CXMLResource *GetResource(int uiIndex, int uiID = -1, CString strName = "", CString strFilename = ""); 00047 virtual CXMLResource *AddResource(CString strName, UINT uiID = 0, eEntityType ResourceType = Entity_Default); 00053 int RemoveResource(CXMLResource *pResource); 00054 00060 virtual int LoadXML(TiXmlNode *pDataNode, CString strFilename); 00066 virtual int SaveXML(TiXmlNode *pDataNode, CString strFilename); 00071 virtual void Destroy(); 00076 virtual bool IsOfType(eEntityType eType); 00077 }; 00078 00079 #endif