FDO API Reference | Feature Data Objects |
00001 #ifndef FDO_XMLCLASSMAPPING_H 00002 #define FDO_XMLCLASSMAPPING_H 00003 00004 // 00005 // Copyright (C) 2004-2006 Autodesk, Inc. 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of version 2.1 of the GNU Lesser 00009 // General Public License as published by the Free Software Foundation. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 // 00020 00021 #ifdef _WIN32 00022 #pragma once 00023 #endif 00024 00025 #include <FdoStd.h> 00026 #include <Fdo/Commands/Schema/PhysicalClassMapping.h> 00027 #include <Fdo/Xml/ElementMappingCollection.h> 00028 00029 /// \brief 00030 /// FdoXmlClassMapping describes GML to FDO mappings for a particular FDO class 00031 /// Only mappings that cannot be represented in FDO are described. 00032 class FdoXmlClassMapping : public FdoPhysicalClassMapping 00033 { 00034 public: 00035 /// \brief 00036 /// Constructs an object describing the GML-FDO mappings for an FDO class. 00037 /// 00038 /// \param name 00039 /// Input class name 00040 /// \param GmlName 00041 /// Input corresponding type name in GML version of the 00042 /// class's schema. 00043 /// \param wkBaseName 00044 /// Input name of the most specialized well-known type. This is 00045 /// set when the type represents geometries and indicates what kind of geometries the type 00046 /// represents. wkBaseName must be L"" or one of the constants defined in 00047 /// commonGml212Gml212.h. 00048 /// \param wkSchemaName 00049 /// Well-known schema name. 00050 /// 00051 /// \return 00052 /// Returns FdoXmlClassMapping 00053 /// 00054 FDO_API static FdoXmlClassMapping* Create( 00055 FdoString* name, 00056 FdoString* gmlName, 00057 FdoString* wkBaseName, 00058 FdoString* wkSchemaName = L"" 00059 ); 00060 00061 /// \brief 00062 /// Gets the name of the class's corresponding GML complexType. 00063 /// 00064 /// \return 00065 /// Returns FdoString. 00066 /// 00067 FDO_API FdoString* GetGmlName(); 00068 00069 /// \brief 00070 /// Gets the most specialized well-known base type 00071 /// 00072 /// \return 00073 /// Returns FdoString. 00074 /// 00075 FDO_API FdoString* GetWkBaseName(); 00076 00077 /// \brief 00078 /// Gets the schema containing most specialized well-known base type 00079 /// 00080 /// \return 00081 /// Returns FdoString. 00082 /// 00083 FDO_API FdoString* GetWkSchemaName(); 00084 00085 /// \brief 00086 /// Gets the mappings between GML elements for this class's properties and their 00087 /// Fdo Classes. 00088 /// 00089 /// \return 00090 /// Returns FdoXmlElementMappingCollection* 00091 /// 00092 FDO_API FdoXmlElementMappingCollection* GetElementMappings(); 00093 00094 /// \cond DOXYGEN-IGNORE 00095 00096 /// \brief 00097 /// Writes this XML Class Mapping to XML. Called when 00098 /// the element is serialized to XML. 00099 /// 00100 /// \param xmlWriter 00101 /// Input write the element to this XML writer 00102 /// \param flags 00103 /// Input flags that control the writing of the element. 00104 /// 00105 /// \return 00106 /// Returns nothing 00107 /// 00108 virtual void _writeXml( 00109 FdoXmlWriter* xmlWriter, 00110 const FdoXmlFlags* flags 00111 ); 00112 /// \endcond 00113 00114 /// \cond DOXYGEN-IGNORE 00115 protected: 00116 FdoXmlClassMapping() {} 00117 00118 FdoXmlClassMapping( 00119 FdoString* name, 00120 FdoString* gmlName, 00121 FdoString* wkBaseName, 00122 FdoString* wkSchemaName 00123 ); 00124 00125 virtual ~FdoXmlClassMapping(); 00126 00127 virtual void Dispose(); 00128 00129 /// Functions for XML support 00130 00131 /// \brief 00132 /// Initializes this Xml Class Mapping from its XML attributes. Called when 00133 /// the element is deserialized from XML. 00134 /// 00135 /// \param pContext 00136 /// Input context contain information about the current deserialization operation 00137 /// \param attrs 00138 /// Input the XML attributes. 00139 /// 00140 /// \return 00141 /// Returns nothing 00142 /// 00143 virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs); 00144 00145 /// \endcond 00146 00147 private: 00148 FdoStringP mGmlName; 00149 FdoStringP mWkBaseName; 00150 FdoStringP mWkSchemaName; 00151 FdoXmlElementMappingsP mElementMappings; 00152 }; 00153 00154 /// \ingroup (typedefs) 00155 /// \brief 00156 /// FdoXmlClassMappingP is a FdoPtr on FdoXmlClassMapping, provided for convenience. 00157 typedef FdoPtr<FdoXmlClassMapping> FdoXmlClassMappingP; 00158 00159 #endif 00160 00161
Comments or suggestions? Send us feedback. |