PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: XmlUnknown.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLCORE_XML_UNKNOWN_H__ 00024 #define __PLCORE_XML_UNKNOWN_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLCore/Xml/XmlNode.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLCore { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Classes ] 00042 //[-------------------------------------------------------] 00043 /** 00044 * @brief 00045 * Unknown XML node 00046 * 00047 * @remarks 00048 * Any tag that the XML parser doesn't recognize is saved as an unknown. It is a tag 00049 * of text, but should not be modified. It will be written back to the XML, unchanged, 00050 * when the file is saved. DTD tags get thrown into XmlUnknown. 00051 */ 00052 class XmlUnknown : public XmlNode { 00053 00054 00055 //[-------------------------------------------------------] 00056 //[ Friends ] 00057 //[-------------------------------------------------------] 00058 friend class XmlNode; 00059 00060 00061 //[-------------------------------------------------------] 00062 //[ Public functions ] 00063 //[-------------------------------------------------------] 00064 public: 00065 /** 00066 * @brief 00067 * Default constructor 00068 */ 00069 PLCORE_API XmlUnknown(); 00070 00071 /** 00072 * @brief 00073 * Copy constructor 00074 * 00075 * @param[in] cSource 00076 * Source to copy from 00077 */ 00078 PLCORE_API XmlUnknown(const XmlUnknown &cSource); 00079 00080 /** 00081 * @brief 00082 * Destructor 00083 */ 00084 PLCORE_API virtual ~XmlUnknown(); 00085 00086 /** 00087 * @brief 00088 * Copy operator 00089 * 00090 * @param[in] cSource 00091 * Source to copy from 00092 * 00093 * @return 00094 * Reference to this instance 00095 */ 00096 inline XmlUnknown &operator =(const XmlUnknown &cSource); 00097 00098 00099 //[-------------------------------------------------------] 00100 //[ Public virtual XmlBase functions ] 00101 //[-------------------------------------------------------] 00102 public: 00103 PLCORE_API virtual bool Save(File &cFile, uint32 nDepth = 0) override; 00104 PLCORE_API virtual String ToString(uint32 nDepth = 0) const override; 00105 PLCORE_API virtual const char *Parse(const char *pszData, XmlParsingData *pData = nullptr, EEncoding nEncoding = EncodingUnknown) override; 00106 00107 00108 //[-------------------------------------------------------] 00109 //[ Public virtual XmlNode functions ] 00110 //[-------------------------------------------------------] 00111 public: 00112 PLCORE_API virtual XmlNode *Clone() const override; 00113 00114 00115 }; 00116 00117 00118 //[-------------------------------------------------------] 00119 //[ Namespace ] 00120 //[-------------------------------------------------------] 00121 } // PLCore 00122 00123 00124 //[-------------------------------------------------------] 00125 //[ Implementation ] 00126 //[-------------------------------------------------------] 00127 #include "PLCore/Xml/XmlUnknown.inl" 00128 00129 00130 #endif // __PLCORE_XML_UNKNOWN_H__
|