FDO API Reference Feature Data Objects

PhysicalSchemaMappingCollection.h

Go to the documentation of this file.
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     /// \param parent 
00050     /// Input parent
00051     /// 
00052     /// \return
00053     /// Returns FdoPhysicalSchemaMappingCollection
00054     /// 
00055     FDO_API static FdoPhysicalSchemaMappingCollection* Create();
00056 
00057     /// \brief
00058     /// Gets the Schema Override set in the collection at the specified index. Throws an invalid argument exception if the index is out of range.
00059     /// 
00060     /// \param index 
00061     /// Input index
00062     /// 
00063     /// \return
00064     /// Returns the Schema Override set at the specified index
00065     /// 
00066     FDO_API FdoPhysicalSchemaMapping* GetItem( FdoInt32 item );
00067 
00068     /// \brief
00069     /// Gets the Schema Override set for the specified 
00070     /// FDO provider and Feature Schema.
00071     /// 
00072     /// \param providerName 
00073     /// Input FDO Provider name of the form "[Company].[Provider].[Version]".
00074     /// \param schemaName 
00075     /// Input Feature Schema name.
00076     /// 
00077     /// \return
00078     /// the Schema Override set for the given FDO Provider and Feature 
00079     /// Schema, where the  [company] and [provider] parts of the set’s providerName 
00080     /// and the given providerName match exactly. The set with the highest 
00081     /// [version], that is less than or equal to the [version] of the given provider, 
00082     /// is returned.  NULL is return if a set was not found.
00083     /// 
00084     FDO_API FdoPhysicalSchemaMapping * GetItem( 
00085         FdoString* providerName, 
00086         FdoString* schemaName
00087     );
00088 
00089     /// \brief
00090     /// Gets the Schema Override set for the specified Feature Schema and the
00091     /// FDO provider for the specified connection. This function allows an application 
00092     /// to retrieve the Schema Overrides for an active provider without knowing the 
00093     /// provider name.
00094     /// 
00095     /// \param connection 
00096     /// Input the FDO connection.
00097     /// \param schemaName 
00098     /// Input Feature Schema name.
00099     /// 
00100     /// \return
00101     /// Returns the Schema Override set for the given Feature Schema and 
00102     /// the FDO Provider for the given connection. NULL is return if the set was not 
00103     /// found.
00104     /// 
00105     FDO_API FdoPhysicalSchemaMapping * GetItem( 
00106         FdoIConnection* connection, 
00107         FdoString* schemaName
00108     );
00109 
00110 /// \cond DOXYGEN-IGNORE
00111     /// FdoXmlDeserializable overrides for deserializing a Schema Override set collection 
00112     /// from XML. These are not exposed via the FDO API.
00113 
00114     FDO_API virtual void XmlEndDocument(FdoXmlSaxContext* context);
00115 
00116     FDO_API virtual FdoXmlSaxHandler* XmlStartElement(
00117         FdoXmlSaxContext* context, 
00118         FdoString* uri, 
00119         FdoString* name, 
00120         FdoString* qname, 
00121         FdoXmlAttributeCollection* atts
00122     );
00123 
00124     FDO_API virtual FdoXmlSaxContext* GetSaxContext();
00125 
00126 protected:
00127     FDO_API FdoPhysicalSchemaMappingCollection();
00128 
00129     FDO_API virtual ~FdoPhysicalSchemaMappingCollection()
00130     {
00131     }
00132 
00133     FDO_API virtual void Dispose()
00134     {
00135         delete this;
00136     }
00137 
00138     /// FdoXmlSerializable override that serializes a Feature Schema collection to XML.
00139     FDO_API virtual void _writeXml( FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags );
00140 /// \endcond
00141 
00142 private:
00143 };
00144 
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.