FDO API Reference Feature Data Objects

PhysicalSchemaMapping.h

Go to the documentation of this file.
00001 #ifndef FDO_PHYSICALSCHEMAMAPPING_H_
00002 #define FDO_PHYSICALSCHEMAMAPPING_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/Serializable.h>
00028 #include <Fdo/Commands/Schema/PhysicalElementMapping.h>
00029 
00030 /// \brief
00031 /// FdoPhysicalSchemaMapping is an  abstract class that is the base class of
00032 /// all Schema Override sets. Each instance contains the overrides for a 
00033 /// particular Feature Schema and FDO Provider.
00034 /// Each FDO Provider, that allows Schema Overrides, must create a sub-class of this 
00035 /// class. This sub-class must implement the overrides that are specific to the 
00036 /// provider. The Provider can also add support, for serializing to an XML document, 
00037 /// by overriding the functions inherited from  FdoXmlSerializable.
00038 class FdoPhysicalSchemaMapping :
00039     public FdoPhysicalElementMapping,
00040     public FdoXmlSerializable
00041 {
00042     friend class FdoPhysicalSchemaMappingCollection;
00043  
00044 public:
00045     /// \brief
00046     /// Gets the name of the applicable FDO provider.
00047     /// 
00048     /// \return
00049     /// Returns the name of FDO provider to which this Schema Override set 
00050     /// applies. The provider name must conform to the format:
00051     /// "[Company].[Provider].[Version]".
00052     /// 
00053     FDO_API virtual FdoString* GetProvider() = 0;
00054 
00055 protected:
00056     /// \brief
00057     /// Initializes this Schema Override set from its XML attributes. Called when
00058     /// the set is deserialized from XML. This function decodes any
00059     /// encoded schema names (See _writeXml). Can be extended to handle 
00060     /// particular XML attributes for derived classes.
00061     /// 
00062     /// \param pContext 
00063     /// Input context contain information about the current deserialization operation
00064     /// \param attrs 
00065     /// Input the XML attributes.
00066     /// 
00067     /// \return
00068     /// Returns nothing
00069     /// 
00070     FDO_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00071 
00072     /// \brief
00073     /// Writes this Schema Override set to XML. Called when
00074     /// this set is serialized to XML. This function converts (encodes) 
00075     /// schema names to be valid XML element names. Can be extended to handle provider-specific
00076     /// attributes and sub-elements.
00077     /// 
00078     /// \param xmlWriter 
00079     /// Input write the Schema Override set to this XML writer
00080     /// \param flags 
00081     /// Input flags that control the writing of the Schema Override set.
00082     /// 
00083     /// \return
00084     /// Returns nothing
00085     /// 
00086     FDO_API virtual void _writeXml(
00087         FdoXmlWriter* xmlWriter, 
00088         const FdoXmlFlags* flags
00089     );
00090 
00091 };
00092 
00093 /// \brief
00094 /// FdoIPhysicalSchemaMappingP is a FdoPtr on FdoIPhysicalSchemaMapping, provided for convenience.
00095 typedef FdoPtr<FdoPhysicalSchemaMapping> FdoPhysicalSchemaMappingP;
00096 
00097 #endif
00098 
00099 

Comments or suggestions? Send us feedback.