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 "Runtime\Disposable.h" 00022 #include "Common\Xml\mgIXmlSaxHandler.h" 00023 00024 class VirtualSaxHandler; 00025 class FdoXmlSaxHandler; 00026 00027 BEGIN_NAMESPACE_OSGEO_COMMON_XML 00028 public __gc class XmlAttributeCollection; 00029 public __gc class XmlSaxContext; 00030 00031 /// \ingroup (OSGeoFDOCommonXml) 00032 /// \brief 00033 /// XmlSaxHandler defines the SAX Handler callback interface. 00034 /// It is not an interface in the strict sense, since each function has a 00035 /// default implementation that does nothing. Implementors can override these 00036 /// callbacks to customize the handling of XML fragments parsed by XmlReader. 00037 public __gc class XmlSaxHandler : public NAMESPACE_OSGEO_RUNTIME::Disposable, public NAMESPACE_OSGEO_COMMON_XML::IXmlSaxHandler 00038 { 00039 public: 00040 XmlSaxHandler(); 00041 /// \brief 00042 /// Default Sax callback that is called when the XmlReader 00043 /// starts reading an XML document. Does nothing. 00044 /// 00045 /// \param context 00046 /// Input caller specified contextual information 00047 /// 00048 /// \return 00049 /// Returns the SAX Handler for the document's root element. If NULL then 00050 /// this SAX handler will handle the root element 00051 /// 00052 virtual NAMESPACE_OSGEO_COMMON_XML::IXmlSaxHandler* XmlStartDocument(NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* context); 00053 00054 /// \brief 00055 /// Default Sax callback that is called when the XmlReader 00056 /// finishes reading an XML document. Does nothing. 00057 /// 00058 /// \param context 00059 /// Input caller specified contextual information 00060 /// 00061 virtual System::Void XmlEndDocument(NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* context); 00062 00063 /// \brief 00064 /// Default Sax callback that is called when the XmlReader 00065 /// reads the start tag for an XML element in the document. Does nothing. 00066 /// 00067 /// \param context 00068 /// Input caller specified contextual information 00069 /// \param resourceLocation 00070 /// Input the element's Universal Resource Indicator 00071 /// \param name 00072 /// Input the unqualified element name (doesn't include namespace) 00073 /// \param qualifiedName 00074 /// Input the qualified element name (includes namespace) 00075 /// \param attributes 00076 /// Input the attributes for the element. 00077 /// 00078 /// \return 00079 /// Returns the SAX Handler for the element's sub-elements. If NULL then 00080 /// this SAX handler will handle the sub-elements 00081 /// 00082 virtual NAMESPACE_OSGEO_COMMON_XML::IXmlSaxHandler* XmlStartElement(NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* context, System::String* resourceLocation, System::String* name, System::String* qualifiedName, NAMESPACE_OSGEO_COMMON_XML::XmlAttributeCollection* attributes); 00083 00084 /// \brief 00085 /// Default Sax callback that is called when the XmlReader 00086 /// reads the end tag for an XML element in the document. Does nothing. 00087 /// 00088 /// \param context 00089 /// Input caller specified contextual information 00090 /// \param resourceLocation 00091 /// Input the element's Universal Resource Indicator 00092 /// \param name 00093 /// Input the unqualified element name (doesn't include namespace) 00094 /// \param qualifiedName 00095 /// Input the qualified element name (includes namespace) 00096 /// 00097 /// \return 00098 /// Returning true causes the current parse to stop. Returning false 00099 /// cause the parse to continue. Return value is ignored if the current parse 00100 /// is not an incremental parse ( see XmlReader::Parse()) 00101 /// 00102 virtual System::Boolean XmlEndElement(NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* context, System::String* resourceLocation, System::String* name, System::String* qualifiedName); 00103 00104 /// \brief 00105 /// Default Sax callback that is called when the XmlReader 00106 /// reads a chunk of simple content for the current element. Does nothing by default. 00107 /// This function may be called multiple times for the same element, if the 00108 /// the content is long. Applications must not make any assumptions about the 00109 /// chunk size or number of chunks for each element 00110 /// 00111 /// \param context 00112 /// Input caller specified contextual information 00113 /// \param characters 00114 /// Input the next chunk of simple content 00115 /// 00116 virtual System::Void XmlCharacters(NAMESPACE_OSGEO_COMMON_XML::XmlSaxContext* context, System::String* characters); 00117 00118 /// \brief 00119 /// Constructs a SaxHandler based on an unmanaged instance of the object 00120 /// 00121 /// \param unmanaged 00122 /// Input A Pointer to the unmanaged object. 00123 /// 00124 /// \param autoDelete 00125 /// Input Indicates if the constructed object should be automatically deleted 00126 /// once it no longer referenced. 00127 /// 00128 XmlSaxHandler(System::IntPtr unmanaged, System::Boolean autoDelete); 00129 00130 /// \cond DOXYGEN-IGNORE 00131 public private: 00132 inline FdoXmlSaxHandler* GetImpObj(); 00133 00134 protected: 00135 System::Void ReleaseUnmanagedObject(); 00136 /// \endcond 00137 }; 00138 END_NAMESPACE_OSGEO_COMMON_XML 00139 00140
Comments or suggestions? Send us feedback. |