00001 #ifndef XMLRESOURCE_H 00002 #define XMLRESOURCE_H 00003 00004 #pragma once 00005 00006 #include "Resource.h" 00007 #include "TinyXML.h" 00008 00009 #define ERROR_XML_GENERAL 1001 00010 #define ERROR_XML_PARSING_FAILED 1002 00011 #define ERROR_XML_ 00012 00014 00017 class CXMLResource : public CResource 00018 { 00019 public: 00020 00021 CXMLResource(); 00022 virtual ~CXMLResource(); 00023 00029 virtual int LoadXML(TiXmlNode *pDataNode, CString strFilename); 00035 virtual int SaveXML(TiXmlNode *pDataNode, CString strFilename); 00040 virtual void Destroy(); 00045 CString GetFilename(); 00050 virtual bool IsOfType(eEntityType eType); 00056 virtual bool PropertyChanging(const void* pvProperty , void* pvNewValue); 00061 virtual void GetProperties(EPropList& PropList); 00062 protected: 00067 void SetFilename(CString strFilename); 00068 00069 TiXmlElement *m_pXMLElement; 00070 CString m_strFilename; 00071 }; 00072 00073 #endif