FDO .NET API Reference | Feature Data Objects |
00001 /* 00002 * Copyright (C) 2004-2006 Autodesk, Inc. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of version 2.1 of the GNU Lesser 00006 * General Public License as published by the Free Software Foundation. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 */ 00018 00019 #pragma once 00020 00021 #include "FDO\Xml\mgIXmlDeserializable.h" 00022 00023 class FdoXmlDeserializable; 00024 00025 BEGIN_NAMESPACE_OSGEO_FDO_XML 00026 public __gc class XmlFlags; 00027 00028 /// \ingroup (OSGeoFDOXml) 00029 /// \brief 00030 /// XmlDeserializable provides the ability to deserialize an FDO object 00031 /// from an XML Document. Deserialization support can be added to any class by basing 00032 /// it on XmlDeserializable and implementing the XmlSaxHander callbacks. 00033 public __gc class XmlDeserializable : public NAMESPACE_OSGEO_COMMON_XML::XmlSaxHandler, public NAMESPACE_OSGEO_FDO_XML::IXmlDeserializable 00034 { 00035 public: 00036 /// \brief 00037 /// Reads from an XML document in a file. 00038 /// 00039 /// \param fileName 00040 /// Input the file name. Must consist of an XML document. 00041 /// 00042 System::Void ReadXml(System::String* fileName); 00043 00044 /// \brief 00045 /// Reads from an XML document in a file. 00046 /// 00047 /// \param fileName 00048 /// Input the file name. Must consist of an XML document. 00049 /// \param flags 00050 /// Input controls the reading of the elements from the document. 00051 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00052 /// 00053 System::Void ReadXml(System::String* fileName, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00054 00055 /// \brief 00056 /// Reads an XML document from an XML reader. 00057 /// 00058 /// \param xmlReader 00059 /// Input the XML reader. 00060 /// 00061 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_XML::XmlReader* xmlReader); 00062 00063 /// \brief 00064 /// Reads an XML document from an XML reader. 00065 /// 00066 /// \param xmlReader 00067 /// Input the XML reader. 00068 /// \param flags 00069 /// Input controls the reading of the elements from the document. 00070 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00071 /// 00072 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_XML::XmlReader* xmlReader, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00073 00074 /// \brief 00075 /// Reads an XML document from a text reader. 00076 /// 00077 /// \param textReader 00078 /// Input the text reader. Must be positioned at the 00079 /// start of an XML document. 00080 /// 00081 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoTextReader* textReader); 00082 00083 /// \brief 00084 /// Reads an XML document from a text reader. 00085 /// 00086 /// \param textReader 00087 /// Input the text reader. Must be positioned at the 00088 /// start of an XML document. 00089 /// \param flags 00090 /// Input controls the reading of the elements from the document. 00091 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00092 /// 00093 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoTextReader* textReader, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00094 00095 /// \brief 00096 /// Reads an XML document from a stream. 00097 /// 00098 /// \param stream 00099 /// Input the stream. Must be positioned at the 00100 /// start of an XML document. 00101 /// 00102 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream); 00103 00104 /// \brief 00105 /// Reads an XML document from a stream. 00106 /// 00107 /// \param stream 00108 /// Input the stream. Must be positioned at the 00109 /// start of an XML document. 00110 /// \param flags 00111 /// Input controls the reading of the elements from the document. 00112 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00113 /// 00114 /// 00115 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00116 00117 /// \brief 00118 /// Gets the XML Flags that were passed to the ReadXml() 00119 /// function that is currently being executed. This function would 00120 /// typically be called by the XmlSaxHandler callbacks. 00121 /// 00122 /// \return 00123 /// Returns the XML Flags 00124 /// 00125 NAMESPACE_OSGEO_FDO_XML::XmlFlags* GetDeserializationFlags(); 00126 00127 /// \brief 00128 /// Gets the current XML Reader. This function would 00129 /// typically be called by the XmlSaxHandler callbacks when 00130 /// ReadXml() is being invoked. When ReadXml() reads from a file, stream, 00131 /// or text reader, a wrapping XML reader is automatically created. 00132 /// 00133 /// \return 00134 /// Returns the XML reader 00135 /// 00136 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetXmlReader(); 00137 00138 /// \brief 00139 /// Gets the stylesheet for converting the XML document from 00140 /// external to internal format. When classes derived from XmlDeserializable 00141 /// define an internal format, they must override this function to return a 00142 /// stylesheet that does the conversion. 00143 /// 00144 /// \return 00145 /// Returns NULL by default (no internal format defined) 00146 /// 00147 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetFromExternalStylesheet(); 00148 00149 /// \brief 00150 /// Gets the SAX context to pass to the XmlSaxHandler callbacks. 00151 /// Classes derived from XmlDeserializable can override this function to 00152 /// specify a SAX context with class-specific information. 00153 /// 00154 /// \return 00155 /// Returns NULL by default, the default NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext is used. 00156 /// The default provides basic error handling functionality. 00157 /// 00158 NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* GetSaxContext(); 00159 00160 public private: 00161 XmlDeserializable(System::IntPtr unmanaged, System::Boolean autoDelete); 00162 00163 inline FdoXmlDeserializable* GetImpObj(); 00164 }; 00165 00166 END_NAMESPACE_OSGEO_FDO_XML 00167 00168
Comments or suggestions? Send us feedback. |