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 BEGIN_NAMESPACE_OSGEO_FDO_XML 00022 public __gc class XmlFlags; 00023 00024 /// \ingroup (OSGeoFDOXml) 00025 /// \interface OSGeo::FDO::Xml::IXmlDeserializable 00026 /// \brief 00027 /// XmlDeserializable provides the ability to deserialize an FDO object 00028 /// from an XML Document. Deserialization support can be added to any class by basing 00029 /// it on XmlDeserializable and implementing the XmlSaxHander callbacks. 00030 public __gc __interface IXmlDeserializable : public NAMESPACE_OSGEO_COMMON_XML::IXmlSaxHandler 00031 { 00032 public: 00033 /// \brief 00034 /// Reads from an XML document in a file. 00035 /// 00036 /// \param fileName 00037 /// Input the file name. Must consist of an XML document. 00038 /// 00039 System::Void ReadXml(System::String* fileName); 00040 00041 /// \brief 00042 /// Reads from an XML document in a file. 00043 /// 00044 /// \param fileName 00045 /// Input the file name. Must consist of an XML document. 00046 /// \param flags 00047 /// Input controls the reading of the elements from the document. 00048 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00049 /// 00050 System::Void ReadXml(System::String* fileName, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00051 00052 /// \brief 00053 /// Reads an XML document from an XML reader. 00054 /// 00055 /// \param xmlReader 00056 /// Input the XML reader. 00057 /// 00058 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_XML::XmlReader* xmlReader); 00059 00060 /// \brief 00061 /// Reads an XML document from an XML reader. 00062 /// 00063 /// \param xmlReader 00064 /// Input the XML reader. 00065 /// \param flags 00066 /// Input controls the reading of the elements from the document. 00067 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00068 /// 00069 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_XML::XmlReader* xmlReader, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00070 00071 /// \brief 00072 /// Reads an XML document from a text reader. 00073 /// 00074 /// \param textReader 00075 /// Input the text reader. Must be positioned at the 00076 /// start of an XML document. 00077 /// 00078 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoTextReader* textReader); 00079 00080 /// \brief 00081 /// Reads an XML document from a text reader. 00082 /// 00083 /// \param textReader 00084 /// Input the text reader. Must be positioned at the 00085 /// start of an XML document. 00086 /// \param flags 00087 /// Input controls the reading of the elements from the document. 00088 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00089 /// 00090 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoTextReader* textReader, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00091 00092 /// \brief 00093 /// Reads an XML document from a stream. 00094 /// 00095 /// \param stream 00096 /// Input the stream. Must be positioned at the 00097 /// start of an XML document. 00098 /// 00099 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream); 00100 00101 /// \brief 00102 /// Reads an XML document from a stream. 00103 /// 00104 /// \param stream 00105 /// Input the stream. Must be positioned at the 00106 /// start of an XML document. 00107 /// \param flags 00108 /// Input controls the reading of the elements from the document. 00109 /// If NULL then the default flags are used (see NAMESPACE_OSGEO_FDO_XML::XmlFlags::Create()) 00110 /// 00111 System::Void ReadXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00112 00113 /// \brief 00114 /// Gets the XML Flags that were passed to the ReadXml() 00115 /// function that is currently being executed. This function would 00116 /// typically be called by the XmlSaxHandler callbacks. 00117 /// 00118 /// \return 00119 /// Returns the XML Flags 00120 /// 00121 NAMESPACE_OSGEO_FDO_XML::XmlFlags* GetDeserializationFlags(); 00122 00123 /// \brief 00124 /// Gets the current XML Reader. This function would 00125 /// typically be called by the XmlSaxHandler callbacks when 00126 /// ReadXml() is being invoked. When ReadXml() reads from a file, stream, 00127 /// or text reader, a wrapping XML reader is automatically created. 00128 /// 00129 /// \return 00130 /// Returns the XML reader 00131 /// 00132 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetXmlReader(); 00133 00134 /// \brief 00135 /// Gets the stylesheet for converting the XML document from 00136 /// external to internal format. When classes derived from XmlDeserializable 00137 /// define an internal format, they must override this function to return a 00138 /// stylesheet that does the conversion. 00139 /// 00140 /// \return 00141 /// Returns NULL by default (no internal format defined) 00142 /// 00143 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetFromExternalStylesheet(); 00144 00145 /// \brief 00146 /// Gets the SAX context to pass to the XmlSaxHandler callbacks. 00147 /// Classes derived from XmlDeserializable can override this function to 00148 /// specify a SAX context with class-specific information. 00149 /// 00150 /// \return 00151 /// Returns NULL by default, the default NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext is used. 00152 /// The default provides basic error handling functionality. 00153 /// 00154 NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* GetSaxContext(); 00155 }; 00156 00157 END_NAMESPACE_OSGEO_FDO_XML 00158 00159
Comments or suggestions? Send us feedback. |