00001
00002 //
00003 // Copyright (C) 2004-2006 Autodesk, Inc.
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of version 2.1 of the GNU Lesser
00007 // General Public License as published by the Free Software Foundation.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00017 //
00018
00019 #ifndef ARCSDESCHEMAMAPPING_H
00020 #define ARCSDESCHEMAMAPPING_H
00021
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif // _WIN32
00025
00026
00027 class ArcSDESchemaMapping;
00028
00029 #include <ArcSDE/Override/FdoArcSDEClassMapping.h>
00030
00031
00032 class ArcSDESchemaMapping :
00033 public FdoPhysicalSchemaMapping
00034 {
00035 protected:
00036 /// \brief
00037 /// Constructor for the ArcSDESchemaMapping class.
00038 ///
00039 /// \return
00040 /// Returns nothing.
00041 ///
00042 FDOSDE_API ArcSDESchemaMapping(void);
00043
00044 public:
00045 /// \brief
00046 /// Destructor for the ArcSDESchemaMapping class.
00047 ///
00048 /// \return
00049 /// Returns nothing.
00050 ///
00051 FDOSDE_API virtual ~ArcSDESchemaMapping(void);
00052
00053 /// \brief
00054 /// Creates a new instance of the ArcSDESchemaMapping class.
00055 /// \brief
00056 /// /// returns a new instance of the ArcSDESchemaMapping class.
00057 ///
00058 ///
00059 static FDOSDE_API ArcSDESchemaMapping* Create(void);
00060
00061 /// \brief
00062 /// Dispose this object.
00063 ///
00064 /// \return
00065 /// Returns nothing.
00066 ///
00067 FDOSDE_API void Dispose(void) { delete this; }
00068
00069 /// \brief
00070 /// Gets the name of the applicable FDO provider.
00071 ///
00072 /// \return
00073 /// Returns the name of FDO provider to which this Schema Override set
00074 /// applies. The provider name must conform to the format:
00075 /// "[Company].[Provider].[Version]".
00076 ///
00077 FDOSDE_API virtual FdoString* GetProvider();
00078
00079
00080 ////////////////////////////////////////////
00081 ////////////////////////////////////////////
00082 /// Non-inherited public methods:
00083
00084 /// \brief
00085 /// Get the collection of class overrides for this schema mapping.
00086 ///
00087 /// \return
00088 /// Returns the collection of class overrides in this schema mapping.
00089 ///
00090 FDOSDE_API ArcSDEClassMappingCollection* GetClasses();
00091
00092
00093 ////////////////////////////////////////////
00094 ////////////////////////////////////////////
00095 /// Functions to support XML deserialization:
00096
00097 /// \brief
00098 /// Initialize this element from its XML attributes.
00099 ///
00100 /// \return
00101 /// Returns nothing.
00102 ///
00103 FDOSDE_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00104
00105 /// \brief
00106 /// Handle the start of a sub-element.
00107 ///
00108 /// \return
00109 /// Returns nothing.
00110 ///
00111 FDOSDE_API virtual FdoXmlSaxHandler* XmlStartElement(
00112 FdoXmlSaxContext* context,
00113 FdoString* uri,
00114 FdoString* name,
00115 FdoString* qname,
00116 FdoXmlAttributeCollection* atts
00117 );
00118
00119 /// \brief
00120 /// Handle the end of a sub-element.
00121 ///
00122 /// \return
00123 /// Returns nothing.
00124 ///
00125 FDOSDE_API virtual FdoBoolean XmlEndElement(
00126 FdoXmlSaxContext* context,
00127 FdoString* uri,
00128 FdoString* name,
00129 FdoString* qname
00130 );
00131
00132
00133 protected:
00134 ////////////////////////////////////////////
00135 ////////////////////////////////////////////
00136 /// Functions to support XML serialization:
00137
00138 /// \brief
00139 /// Write this element to XML.
00140 ///
00141 /// \return
00142 /// Returns nothing.
00143 ///
00144 virtual void _writeXml( FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags );
00145
00146
00147 protected:
00148 /// \brief
00149 /// The class mapping collection for this schema.
00150 ///
00151 FdoPtr<ArcSDEClassMappingCollection> m_ClassMappings;
00152 };
00153
00154 #endif // ArcSDESchemaMapping_H
00155
00156