OSGeo FDO Provider for ArcSDE API Reference

ArcSDE API

API Reference OSGeo FDO Provider for ArcSDE

FdoArcSDEIndexMapping.h

Go to the documentation of this file.
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 ARCSDEINDEXMAPPING_H
00020 #define ARCSDEINDEXMAPPING_H
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif // _WIN32
00025 
00026 
00027 class ArcSDEIndexMapping : public FdoPhysicalElementMapping
00028 {
00029 protected:
00030     /// \brief
00031     /// The constructor for the ArcSDEIndexMapping class.
00032     /// 
00033     /// \return
00034     /// Returns nothing.
00035     /// 
00036     FDOSDE_API ArcSDEIndexMapping(void);
00037 
00038 public:
00039     /// \brief
00040     /// The destructor for the ArcSDEIndexMapping class.
00041     /// 
00042     /// \return
00043     /// Returns nothing.
00044     /// 
00045     FDOSDE_API virtual ~ArcSDEIndexMapping(void);
00046 
00047     /// \brief
00048     /// Creates a new instance of the ArcSDEIndexMapping class.
00049     /// 
00050     /// \return
00051     /// Returns a new instance of the ArcSDEIndexMapping class.
00052     /// 
00053     static FDOSDE_API ArcSDEIndexMapping* Create(void);
00054 
00055     /// \brief
00056     /// Dispose this object.
00057     /// 
00058     /// \return
00059     /// Returns nothing.
00060     /// 
00061     FDOSDE_API void Dispose(void)  { delete this; }
00062 
00063 
00064     ///////////////////////////////////////////////////////
00065     ///////////////////////////////////////////////////////
00066     /// Non-inherited public methods:
00067 
00068     /// \brief
00069     /// Returns true if index enforces uniqueness, false otherwise.
00070     /// 
00071     /// \return
00072     /// Returns true if index enforces uniqueness, false otherwise.
00073     /// 
00074     FDOSDE_API bool IsUnique();
00075 
00076     /// \brief
00077     /// Set this to true if index should enforce uniqueness, false otherwise.
00078     /// 
00079     /// \return
00080     /// Returns nothing.
00081     /// 
00082     FDOSDE_API void SetUnique(bool value);
00083 
00084     /// \brief
00085     /// Returns true if index enforces ascending order, false otherwise.
00086     /// 
00087     /// \return
00088     /// Returns true if index enforces ascending order, false otherwise.
00089     /// 
00090     FDOSDE_API bool IsAscending();
00091 
00092     /// \brief
00093     /// Set this to true if index should enforce ascending order, false otherwise.
00094     /// 
00095     /// \return
00096     /// Returns nothing.
00097     /// 
00098     FDOSDE_API void SetAscending(bool value);
00099 
00100     /// \brief
00101     /// Returns the collection of FDO property names this index applies to.  Must be non-empty when executing ApplySchema.
00102     /// 
00103     /// \return
00104     /// Returns the collection of FDO property names this index applies to.
00105     /// 
00106     FDOSDE_API FdoStringCollection* GetPropertyNames();
00107 
00108 
00109     ///////////////////////////////////////////////////////
00110     ///////////////////////////////////////////////////////
00111     /// Functions for XML support:
00112 
00113     /// \brief
00114     /// Initialize this element from its XML attributes.
00115     /// 
00116     /// \return
00117     /// Returns nothing.
00118     /// 
00119     FDOSDE_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00120 
00121     /// \brief
00122     /// Handle the start of a sub-element.
00123     /// 
00124     /// \return
00125     /// Returns nothing.
00126     /// 
00127     FDOSDE_API virtual FdoXmlSaxHandler* XmlStartElement(
00128         FdoXmlSaxContext* context, 
00129         FdoString* uri, 
00130         FdoString* name, 
00131         FdoString* qname, 
00132         FdoXmlAttributeCollection* atts
00133     );
00134 
00135     /// \brief
00136     /// Handle the end of a sub-element.
00137     /// 
00138     /// \return
00139     /// Returns nothing.
00140     /// 
00141     FDOSDE_API virtual FdoBoolean XmlEndElement(
00142         FdoXmlSaxContext* context, 
00143         FdoString* uri, 
00144         FdoString* name, 
00145         FdoString* qname
00146     );
00147 
00148 protected:
00149     /// \brief
00150     /// Whether or not this index enforces uniqueness.
00151     /// 
00152     bool m_Unique;
00153 
00154     /// \brief
00155     /// Whether or not this index enforces ascending order.
00156     /// 
00157     bool m_Ascending;
00158 
00159     /// \brief
00160     /// The properties this index applies to.
00161     /// 
00162     FdoPtr<FdoStringCollection> m_IndexPropertyMappings;
00163 };
00164 
00165 
00166 class ArcSDEIndexMappingCollection : public FdoPhysicalElementMappingCollection<ArcSDEIndexMapping>
00167 {
00168 protected:
00169     /// 0-argument constructor to please FdoPtr::operator->() :
00170     ArcSDEIndexMappingCollection () { ArcSDEIndexMappingCollection(NULL); }
00171 
00172     /// \brief
00173     /// The constructor for the ArcSDEIndexMappingCollection class.
00174     /// 
00175     /// \return
00176     /// Returns nothing.
00177     /// 
00178     FDOSDE_API ArcSDEIndexMappingCollection(ArcSDEClassMapping *parent) : FdoPhysicalElementMappingCollection<ArcSDEIndexMapping>((FdoPhysicalElementMapping*)parent) {};
00179 
00180 public:
00181     /// \brief
00182     /// The destructor for the ArcSDEIndexMappingCollection class.
00183     /// 
00184     /// \return
00185     /// Returns nothing.
00186     /// 
00187     FDOSDE_API virtual ~ArcSDEIndexMappingCollection(void)  {};
00188 
00189     /// \brief
00190     /// Creates a new instance of the ArcSDEIndexMappingCollection class.
00191     /// 
00192     /// \return
00193     /// Returns a new instance of the ArcSDEIndexMappingCollection class.
00194     /// 
00195     static FDOSDE_API ArcSDEIndexMappingCollection* Create(ArcSDEClassMapping *parent);
00196 
00197     /// \brief
00198     /// Dispose this object.
00199     /// 
00200     /// \return
00201     /// Returns nothing.
00202     /// 
00203     FDOSDE_API void Dispose(void)  { delete this; }
00204 };
00205 
00206 
00207 
00208 #endif // ARCSDEINDEXMAPPING_H
00209 
00210 

Comments?