FDO API Reference | Feature Data Objects |
00001 #ifndef FDO_PHYSICALSCHEMAMAPPINGCOLLECTION_H 00002 #define FDO_PHYSICALSCHEMAMAPPINGCOLLECTION_H 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 #ifdef _WIN32 00023 #pragma once 00024 #endif 00025 00026 #include <FdoStd.h> 00027 #include <Fdo/Xml/Deserializable.h> 00028 #include <Fdo/Xml/Serializable.h> 00029 #include <Fdo/Connections/IConnection.h> 00030 #include <Fdo/Schema/SchemaException.h> 00031 #include <Fdo/Commands/Schema/PhysicalElementMappingCollection.h> 00032 #include <Fdo/Commands/Schema/PhysicalSchemaMapping.h> 00033 00034 class FdoVector; 00035 00036 /// \brief 00037 /// FdoPhysicalSchemaMappingCollection defines a collection of Schema Override 00038 /// sets. This is a generic collection which can contain override sets for different 00039 /// FDO Providers. 00040 class FdoPhysicalSchemaMappingCollection : 00041 public FdoCollection<FdoPhysicalSchemaMapping, FdoCommandException>, 00042 public FdoXmlDeserializable, 00043 public FdoXmlSerializable 00044 { 00045 public: 00046 /// \brief 00047 /// Constructs an instance of an FdoPhysicalSchemaMappingCollection . 00048 /// 00049 /// \return 00050 /// Returns FdoPhysicalSchemaMappingCollection 00051 /// 00052 FDO_API static FdoPhysicalSchemaMappingCollection* Create(); 00053 00054 /// \brief 00055 /// Gets the Schema Override set in the collection at the specified index. Throws an invalid argument exception if the index is out of range. 00056 /// 00057 /// \param item 00058 /// Input item 00059 /// 00060 /// \return 00061 /// Returns the Schema Override set at the specified index 00062 /// 00063 FDO_API FdoPhysicalSchemaMapping* GetItem( FdoInt32 item ); 00064 00065 /// \brief 00066 /// Gets the Schema Override set for the specified 00067 /// FDO provider and Feature Schema. 00068 /// 00069 /// \param providerName 00070 /// Input FDO Provider name of the form "[Company].[Provider].[Version]". 00071 /// \param schemaName 00072 /// Input Feature Schema name. 00073 /// 00074 /// \return 00075 /// the Schema Override set for the given FDO Provider and Feature 00076 /// Schema, where the [company] and [provider] parts of the set’s providerName 00077 /// and the given providerName match exactly. The set with the highest 00078 /// [version], that is less than or equal to the [version] of the given provider, 00079 /// is returned. NULL is return if a set was not found. 00080 /// 00081 FDO_API FdoPhysicalSchemaMapping * GetItem( 00082 FdoString* providerName, 00083 FdoString* schemaName 00084 ); 00085 00086 /// \brief 00087 /// Gets the Schema Override set for the specified Feature Schema and the 00088 /// FDO provider for the specified connection. This function allows an application 00089 /// to retrieve the Schema Overrides for an active provider without knowing the 00090 /// provider name. 00091 /// 00092 /// \param connection 00093 /// Input the FDO connection. 00094 /// \param schemaName 00095 /// Input Feature Schema name. 00096 /// 00097 /// \return 00098 /// Returns the Schema Override set for the given Feature Schema and 00099 /// the FDO Provider for the given connection. NULL is return if the set was not 00100 /// found. 00101 /// 00102 FDO_API FdoPhysicalSchemaMapping * GetItem( 00103 FdoIConnection* connection, 00104 FdoString* schemaName 00105 ); 00106 00107 /// \cond DOXYGEN-IGNORE 00108 // 00109 /// FdoXmlDeserializable overrides for deserializing a Schema Override set collection 00110 /// from XML. These are not exposed via the FDO API. 00111 00112 FDO_API virtual void XmlEndDocument(FdoXmlSaxContext* context); 00113 00114 FDO_API virtual FdoXmlSaxHandler* XmlStartElement( 00115 FdoXmlSaxContext* context, 00116 FdoString* uri, 00117 FdoString* name, 00118 FdoString* qname, 00119 FdoXmlAttributeCollection* atts 00120 ); 00121 00122 FDO_API virtual FdoXmlSaxContext* GetSaxContext(); 00123 00124 protected: 00125 FDO_API FdoPhysicalSchemaMappingCollection(); 00126 00127 FDO_API virtual ~FdoPhysicalSchemaMappingCollection() 00128 { 00129 } 00130 00131 FDO_API virtual void Dispose() 00132 { 00133 delete this; 00134 } 00135 00136 /// FdoXmlSerializable override that serializes a Feature Schema collection to XML. 00137 FDO_API virtual void _writeXml( FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags ); 00138 /// \endcond 00139 00140 private: 00141 FdoPtr<FdoXmlSkipElementHandler> m_XmlSkipper; 00142 }; 00143 00144 /// \ingroup (typedefs) 00145 /// \brief 00146 /// FdoSchemaMappingsP is a FdoPtr on FdoPhysicalSchemaMappingCollection, provided for convenience. 00147 typedef FdoPtr<FdoPhysicalSchemaMappingCollection> FdoSchemaMappingsP; 00148 00149 #endif 00150 00151
Comments or suggestions? Send us feedback. |