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 ARCSDEPROPERTYMAPPING_H
00020 #define ARCSDEPROPERTYMAPPING_H
00021
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif // _WIN32
00025
00026 class ArcSDEPropertyMappingCollection;
00027
00028 #include <ArcSDE/Override/FdoArcSDEClassMapping.h>
00029
00030
00031 class ArcSDEPropertyMapping : public FdoPhysicalPropertyMapping
00032 {
00033 protected:
00034 /// \brief
00035 /// The constructor for the ArcSDEPropertyMapping class.
00036 ///
00037 /// \return
00038 /// Returns nothing.
00039 ///
00040 FDOSDE_API ArcSDEPropertyMapping(void);
00041
00042 public:
00043 /// \brief
00044 /// The destructor for the ArcSDEPropertyMapping class.
00045 ///
00046 /// \return
00047 /// Returns nothing.
00048 ///
00049 FDOSDE_API virtual ~ArcSDEPropertyMapping(void);
00050
00051 /// \brief
00052 /// Creates a new instance of the ArcSDEPropertyMapping class.
00053 /// \brief
00054 /// /// returns a new instance of the ArcSDEPropertyMapping class.
00055 ///
00056 ///
00057 static FDOSDE_API ArcSDEPropertyMapping* Create(void);
00058
00059 /// \brief
00060 /// Dispose this object.
00061 ///
00062 /// \return
00063 /// Returns nothing.
00064 ///
00065 FDOSDE_API void Dispose(void) { delete this; }
00066
00067
00068 ///////////////////////////////////////////////////////
00069 ///////////////////////////////////////////////////////
00070 /// Non-inherited public methods:
00071
00072 /// \brief
00073 /// Returns the ArcSDE column name override for this property.
00074 ///
00075 /// \return
00076 /// Returns the ArcSDE column name override for this property.
00077 ///
00078 FDOSDE_API FdoString* GetColumnName();
00079
00080 /// \brief
00081 /// Sets the ArcSDE column name override for this property.
00082 ///
00083 /// \return
00084 /// Returns nothing.
00085 ///
00086 FDOSDE_API void SetColumnName(FdoString*);
00087
00088 /// \brief
00089 /// Returns the ArcSDE column type override for this property.
00090 /// Returns -1 if no override is currently set.
00091 ///
00092 /// \return
00093 /// Returns the ArcSDE column name override for this property.
00094 ///
00095 FDOSDE_API LONG GetColumnType();
00096
00097 /// \brief
00098 /// Sets the ArcSDE column type override for this property.
00099 /// Set to -1 if no override is desired.
00100 ///
00101 /// \return
00102 /// Returns nothing.
00103 ///
00104 FDOSDE_API void SetColumnType(LONG sde_type);
00105
00106
00107 ///////////////////////////////////////////////////////
00108 ///////////////////////////////////////////////////////
00109 /// Functions for XML support:
00110
00111 /// \brief
00112 /// Initialize this element from its XML attributes.
00113 ///
00114 /// \return
00115 /// Returns nothing.
00116 ///
00117 FDOSDE_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00118
00119 /// \brief
00120 /// Handle the start of a sub-element.
00121 ///
00122 /// \return
00123 /// Returns nothing.
00124 ///
00125 FDOSDE_API virtual FdoXmlSaxHandler* XmlStartElement(
00126 FdoXmlSaxContext* context,
00127 FdoString* uri,
00128 FdoString* name,
00129 FdoString* qname,
00130 FdoXmlAttributeCollection* atts
00131 );
00132
00133 /// \brief
00134 /// Handle the end of a sub-element.
00135 ///
00136 /// \return
00137 /// Returns nothing.
00138 ///
00139 FDOSDE_API virtual FdoBoolean XmlEndElement(
00140 FdoXmlSaxContext* context,
00141 FdoString* uri,
00142 FdoString* name,
00143 FdoString* qname
00144 );
00145
00146 protected:
00147 /// \brief
00148 /// The ArcSDE column name override for this property.
00149 ///
00150 FdoStringP m_ColumnName;
00151
00152 /// \brief
00153 /// The ArcSDE column type override for this property.
00154 ///
00155 LONG m_ColumnType;
00156 };
00157
00158
00159 class ArcSDEPropertyMappingCollection : public FdoPhysicalElementMappingCollection<ArcSDEPropertyMapping>
00160 {
00161 protected:
00162 /// 0-argument constructor to please FdoPtr::operator->() :
00163 ArcSDEPropertyMappingCollection () { ArcSDEPropertyMappingCollection(NULL); }
00164
00165 /// \brief
00166 /// The constructor for the ArcSDEPropertyMappingCollection class.
00167 ///
00168 /// \return
00169 /// Returns nothing.
00170 ///
00171 FDOSDE_API ArcSDEPropertyMappingCollection(ArcSDEClassMapping *parent) : FdoPhysicalElementMappingCollection<ArcSDEPropertyMapping>((FdoPhysicalElementMapping*)parent) {};
00172
00173 public:
00174 /// \brief
00175 /// The destructor for the ArcSDEPropertyMappingCollection class.
00176 ///
00177 /// \return
00178 /// Returns nothing.
00179 ///
00180 FDOSDE_API virtual ~ArcSDEPropertyMappingCollection(void) {};
00181
00182 /// \brief
00183 /// Creates a new instance of the ArcSDEPropertyMappingCollection class.
00184 /// \brief
00185 /// /// returns a new instance of the ArcSDEPropertyMappingCollection class.
00186 ///
00187 ///
00188 static FDOSDE_API ArcSDEPropertyMappingCollection* Create(ArcSDEClassMapping *parent);
00189
00190 /// \brief
00191 /// Dispose this object.
00192 ///
00193 /// \return
00194 /// Returns nothing.
00195 ///
00196 FDOSDE_API void Dispose(void) { delete this; }
00197 };
00198
00199
00200 #endif // ARCSDEPROPERTYMAPPING_H
00201
00202