OSGeo FDO Provider for ArcSDE API Reference

ArcSDE API

API Reference OSGeo FDO Provider for ArcSDE

FdoArcSDEClassMapping.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 ARCSDECLASSMAPPING_H
00020 #define ARCSDECLASSMAPPING_H
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif // _WIN32
00025 
00026 class ArcSDEClassMapping;
00027 
00028 #include <ArcSDE/Override/FdoArcSDEPropertyMapping.h>
00029 #include <ArcSDE/Override/FdoArcSDEIndexMapping.h>
00030 
00031 
00032 /// \brief
00033 /// The storage type to use when storing ArcSDE geometries in this class.
00034 typedef enum ArcSDEGeometryStorageType
00035 {
00036     ArcSDEGeometryStorageType_Spatial,
00037     ArcSDEGeometryStorageType_SdeBinary,
00038     ArcSDEGeometryStorageType_LOB,
00039     ArcSDEGeometryStorageType_WKB,
00040     ArcSDEGeometryStorageType_SQL,
00041     ArcSDEGeometryStorageType_Normalized
00042 };
00043 
00044 
00045 class ArcSDEClassMapping : public FdoPhysicalClassMapping
00046 {
00047 protected:
00048     /// \brief
00049     /// The constructor for the ArcSDEClassMapping class.
00050     /// 
00051     /// \return
00052     /// Returns nothing.
00053     /// 
00054     FDOSDE_API ArcSDEClassMapping(void);
00055 
00056 public:
00057     /// \brief
00058     /// The destructor for the ArcSDEClassMapping class.
00059     /// 
00060     /// \return
00061     /// Returns nothing.
00062     /// 
00063     FDOSDE_API virtual ~ArcSDEClassMapping(void);
00064 
00065     /// \brief
00066     /// Creates a new instance of the ArcSDEClassMapping class.
00067     /// 
00068     /// \return
00069     /// Returns a new instance of the ArcSDEClassMapping class.
00070     /// 
00071     static FDOSDE_API ArcSDEClassMapping* Create(void);
00072 
00073     /// \brief
00074     /// Dispose this object.
00075     /// 
00076     /// \return
00077     /// Returns nothing.
00078     /// 
00079     FDOSDE_API void Dispose(void)  { delete this; }
00080 
00081     ///////////////////////////////////////////////////////
00082     ///////////////////////////////////////////////////////
00083     /// Non-inherited public methods:
00084 
00085     /// \brief
00086     /// Returns the current table name override for this class.
00087     /// 
00088     /// \return
00089     /// Returns the current table name override for this class.
00090     /// 
00091     FDOSDE_API FdoString* GetTableName();
00092 
00093     /// \brief
00094     /// Sets the current table name override for this class.
00095     /// 
00096     /// \return
00097     /// Returns nothing.
00098     /// 
00099     FDOSDE_API void SetTableName(FdoString*);
00100 
00101     /// \brief
00102     /// Returns the current owner name override for this class.
00103     /// 
00104     /// \return
00105     /// Returns the current owner name override for this class.
00106     /// 
00107     FDOSDE_API FdoString* GetOwnerName();
00108 
00109     /// \brief
00110     /// Sets the current owner name override for this class.
00111     /// 
00112     /// \return
00113     /// Returns nothing.
00114     /// 
00115     FDOSDE_API void SetOwnerName(FdoString*);
00116 
00117     /// \brief
00118     /// Returns the current database name override for this class.
00119     /// 
00120     /// \return
00121     /// Returns the current database name override for this class.
00122     /// 
00123     FDOSDE_API FdoString* GetDatabaseName();
00124 
00125     /// \brief
00126     /// Sets the current database name override for this class.
00127     /// 
00128     /// \return
00129     /// Returns nothing.
00130     /// 
00131     FDOSDE_API void SetDatabaseName(FdoString*);
00132 
00133     /// \brief
00134     /// Returns the geometry storage type override for this class.
00135     /// 
00136     /// \return
00137     /// Returns the geometry storage type override for this class.
00138     /// 
00139     FDOSDE_API ArcSDEGeometryStorageType GetGeometryStorageType();
00140 
00141     /// \brief
00142     /// Sets the geometry storage type override for this class.
00143     /// 
00144     /// \return
00145     /// Returns nothing.
00146     /// 
00147     FDOSDE_API void SetGeometryStorageType(ArcSDEGeometryStorageType type);
00148 
00149     /// \brief
00150     /// Returns the property mappings for this class.
00151     /// 
00152     /// \return
00153     /// Returns the property mappings for this class.
00154     /// 
00155     FDOSDE_API ArcSDEPropertyMappingCollection* GetProperties();
00156 
00157     /// \brief
00158     /// Returns the index mappings for this class.
00159     /// 
00160     /// \return
00161     /// Returns the index mappings for this class.
00162     /// 
00163     FDOSDE_API ArcSDEIndexMappingCollection* GetIndexes();
00164 
00165 
00166     ///////////////////////////////////////////////////////
00167     ///////////////////////////////////////////////////////
00168     /// Functions for XML support:
00169 
00170     /// \brief
00171     /// Initialize this element from its XML attributes.
00172     /// 
00173     /// \return
00174     /// Returns nothing.
00175     /// 
00176     FDOSDE_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00177 
00178     /// \brief
00179     /// Handle the start of a sub-element.
00180     /// 
00181     /// \return
00182     /// Returns nothing.
00183     /// 
00184     FDOSDE_API virtual FdoXmlSaxHandler* XmlStartElement(
00185         FdoXmlSaxContext* context, 
00186         FdoString* uri, 
00187         FdoString* name, 
00188         FdoString* qname, 
00189         FdoXmlAttributeCollection* atts
00190     );
00191 
00192     /// \brief
00193     /// Handle the end of a sub-element.
00194     /// 
00195     /// \return
00196     /// Returns nothing.
00197     /// 
00198     FDOSDE_API virtual FdoBoolean XmlEndElement(
00199         FdoXmlSaxContext* context, 
00200         FdoString* uri, 
00201         FdoString* name, 
00202         FdoString* qname
00203     );
00204 
00205 protected:
00206     /// \brief
00207     /// The geometry storage type for this class.
00208     /// 
00209     ArcSDEGeometryStorageType  m_GeometryStorageType;
00210 
00211     /// \brief
00212     /// The property mapping collection for this class.
00213     /// 
00214     FdoPtr<ArcSDEPropertyMappingCollection>  m_PropertyMappings;
00215 
00216     /// \brief
00217     /// The index mapping collection for this class.
00218     /// 
00219     FdoPtr<ArcSDEIndexMappingCollection>  m_IndexMappings;
00220 
00221     /// \brief
00222     /// The ArcSDE table name for this class.
00223     /// 
00224     FdoStringP m_TableName;
00225 
00226     /// \brief
00227     /// The ArcSDE owner name for this class.
00228     /// 
00229     FdoStringP m_OwnerName;
00230 
00231     /// \brief
00232     /// The ArcSDE database name for this class.
00233     /// 
00234     FdoStringP m_DatabaseName;
00235 };
00236 
00237 
00238 class ArcSDEClassMappingCollection : public FdoPhysicalElementMappingCollection<ArcSDEClassMapping>
00239 {
00240 protected:
00241     /// 0-argument constructor to please FdoPtr::operator->() :
00242     ArcSDEClassMappingCollection () { ArcSDEClassMappingCollection(NULL); }
00243 
00244     /// \brief
00245     /// The constructor for the ArcSDEClassMappingCollection class.
00246     /// 
00247     /// \return
00248     /// Returns nothing.
00249     /// 
00250     FDOSDE_API ArcSDEClassMappingCollection(ArcSDESchemaMapping* parent) : FdoPhysicalElementMappingCollection<ArcSDEClassMapping>((FdoPhysicalElementMapping*)parent) {}
00251 
00252 public:
00253     /// \brief
00254     /// Dispose this object.
00255     /// 
00256     /// \return
00257     /// Returns nothing.
00258     /// 
00259     FDOSDE_API void Dispose(void)  { delete this; }
00260 
00261     /// \brief
00262     /// Creates an instance of the ArcSDEClassMappingCollection class.
00263     /// 
00264     /// \return
00265     /// Returns nothing.
00266     /// 
00267     static FDOSDE_API ArcSDEClassMappingCollection* Create(ArcSDESchemaMapping* parent);
00268 };
00269 
00270 
00271 #endif //ARCSDECLASSMAPPING_H
00272 
00273 

Comments?