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\mgIXmlSerializable.h" 00022 00023 class FdoXmlSerializable; 00024 00025 BEGIN_NAMESPACE_OSGEO_FDO_XML 00026 public __gc class XmlFlags; 00027 00028 /// \ingroup (OSGeoFDOXml) 00029 /// \brief 00030 /// XmlSerializable provides the ability to serialize an FDO object 00031 /// to an XML Document. Serialization support can be added to any class by basing 00032 /// it on XmlSerializable and implementing the _writeXml callback. 00033 public __gc class XmlSerializable : public NAMESPACE_OSGEO_RUNTIME:: Disposable, public NAMESPACE_OSGEO_FDO_XML::IXmlSerializable 00034 { 00035 public: 00036 /// \brief 00037 /// Writes this object to a file. A complete XML document, 00038 /// containing this object, is written. 00039 /// 00040 /// \param fileName 00041 /// Input the file name. 00042 /// 00043 System::Void WriteXml(String* fileName); 00044 00045 /// \brief 00046 /// Writes this object to a file. A complete XML document, 00047 /// containing this object, is written. 00048 /// 00049 /// \param fileName 00050 /// Input the file name. 00051 /// \param flags 00052 /// Input controls the writing of the elements to the document. 00053 /// If NULL then the default flags are used (see XmlFlags::Create()) 00054 /// 00055 System::Void WriteXml(String* fileName, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00056 00057 /// \brief 00058 /// Writes to an XML writer. This object is appended to the XML document 00059 /// being written. Unlike the other WriteXml() functions it is not necessarily 00060 /// the only object in its document. 00061 /// 00062 /// \param xmlWriter 00063 /// Input the XML writer. When this function completes, the 00064 /// XML writer's current position will be just after this object. 00065 /// 00066 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_XML::XmlWriter* xmlWriter); 00067 00068 /// \brief 00069 /// Writes to an XML writer. This object is appended to the XML document 00070 /// being written. Unlike the other WriteXml() functions it is not necessarily 00071 /// the only object in its document. 00072 /// 00073 /// \param xmlWriter 00074 /// Input the XML writer. When this function completes, the 00075 /// XML writer's current position will be just after this object. 00076 /// \param flags 00077 /// Input controls the writing of the elements to the writer. 00078 /// If NULL then the default flags are used (see XmlFlags::Create()) 00079 /// 00080 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_XML::XmlWriter* xmlWriter, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00081 00082 /// \brief 00083 /// Writes to a text writer. A complete XML document, 00084 /// containing this object, is written. 00085 /// 00086 /// \param textWriter 00087 /// Input the text writer.When this function completes, the 00088 /// text writer's current position will be just after this object. 00089 /// 00090 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoTextWriter* textWriter); 00091 00092 /// \brief 00093 /// Writes to a text writer. A complete XML document, 00094 /// containing this object, is written. 00095 /// 00096 /// \param textWriter 00097 /// Input the text writer.When this function completes, the 00098 /// text writer's current position will be just after this object. 00099 /// \param flags 00100 /// Input controls the writing of the elements to the writer. 00101 /// If NULL then the default flags are used (see XmlFlags::Create()) 00102 /// 00103 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoTextWriter* textWriter, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00104 00105 /// \brief 00106 /// Writes to a stream. A complete XML document, 00107 /// containing this object, is written. 00108 /// 00109 /// \param stream 00110 /// Input the stream. When this function completes, the 00111 /// stream's current position will be just after this object. 00112 /// 00113 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream); 00114 00115 /// \brief 00116 /// Writes to a stream. A complete XML document, 00117 /// containing this object, is written. 00118 /// 00119 /// \param stream 00120 /// Input the stream. When this function completes, the 00121 /// stream's current position will be just after this object. 00122 /// \param flags 00123 /// Input controls the writing of the elements to the stream. 00124 /// If NULL then the default flags are used (see XmlFlags::Create()) 00125 /// 00126 System::Void WriteXml(NAMESPACE_OSGEO_COMMON_IO::IoStream* stream, NAMESPACE_OSGEO_FDO_XML::XmlFlags* flags); 00127 00128 /// \brief 00129 /// Gets the stylesheet for converting the XML document from 00130 /// internal to external format. When classes derived from XmlSerializable 00131 /// define an internal format, they must override this function to return a 00132 /// stylesheet that does the conversion. 00133 /// 00134 /// \return 00135 /// Returns NULL by default (no internal format defined) 00136 /// 00137 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetFromInternalStylesheet(); 00138 00139 public private: 00140 XmlSerializable(System::IntPtr unmanaged, System::Boolean autoDelete); 00141 00142 inline FdoXmlSerializable* GetImpObj(); 00143 00144 /// \cond DOXYGEN-IGNORE 00145 protected: 00146 System::Void ReleaseUnmanagedObject(); 00147 /// \endcond 00148 }; 00149 00150 END_NAMESPACE_OSGEO_FDO_XML 00151 00152
Comments or suggestions? Send us feedback. |