00001 #ifndef FDO_RDBMSOVGEOMETRICPROPERTYDEFINITION_H
00002 #define FDO_RDBMSOVGEOMETRICPROPERTYDEFINITION_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 /// <library>
00023 /// FdoRdbms.lib
00024 /// </library>
00025
00026 #include <Rdbms/Override/RdbmsOv.h>
00027 #include <Rdbms/Override/RdbmsOvPropertyDefinition.h>
00028 #include <Rdbms/Override/RdbmsOvGeometricColumn.h>
00029 #include <Utilities/SchemaMgr/Overrides/GeometricColumnType.h>
00030 #include <Utilities/SchemaMgr/Overrides/GeometricContentType.h>
00031
00032 ///<summary>Abstract class defining physical schema overrides for a geometric property
00033 ///definition.</summary>
00034 class FdoRdbmsOvGeometricPropertyDefinition : virtual public FdoRdbmsOvPropertyDefinition
00035 {
00036 public:
00037 ///<summary>Gets the column override</summary>
00038 /// <returns>Returns FdoRdbmsOvGeometricColumn</returns>
00039 FDORDBMS_OV_API FdoRdbmsOvGeometricColumn* GetColumn();
00040
00041 ///<summary>Gets the geometric column type</summary>
00042 ///<returns>Returns the default geometric column type</returns>
00043 FDORDBMS_OV_API FdoSmOvGeometricColumnType GetGeometricColumnType();
00044
00045 ///<summary>Sets the geometric column type</summary>
00046 /// <param name="mappingType">Input the geometric column type</param>
00047 ///<returns>Returns nothing</returns>
00048 FDORDBMS_OV_API void SetGeometricColumnType(FdoSmOvGeometricColumnType columnType);
00049
00050 ///<summary>Gets the geometric content type</summary>
00051 ///<returns>Returns the geometric content type</returns>
00052 FDORDBMS_OV_API FdoSmOvGeometricContentType GetGeometricContentType();
00053
00054 ///<summary>Sets the content type</summary>
00055 /// <param name="mappingType">Input the content type</param>
00056 ///<returns>Returns nothing</returns>
00057 FDORDBMS_OV_API void SetGeometricContentType(FdoSmOvGeometricContentType contentType);
00058
00059 ///<summary>Gets the ordinate column name for the X ordinate.
00060 /// This only applies when GeometricContentType==FdoSmOvGeometricContentType_Ordinates.
00061 /// Default value is "X".
00062 ///</summary>
00063 ///<returns>Returns the ordinate column name for the X ordinate</returns>
00064 FDORDBMS_OV_API FdoString * GetXColumnName();
00065
00066 ///<summary>Sets the ordinate column name for the X ordinate</summary>
00067 /// <param name="mappingType">Input the X ordinate column name</param>
00068 ///<returns>Returns nothing</returns>
00069 FDORDBMS_OV_API void SetXColumnName(FdoString * columnName);
00070
00071 ///<summary>Gets the ordinate column name for the Y ordinate.
00072 /// This only applies when GeometricContentType==FdoSmOvGeometricContentType_Ordinates.
00073 /// Default value is "Y".
00074 ///</summary>
00075 ///<returns>Returns the ordinate column name for the Y ordinate</returns>
00076 FDORDBMS_OV_API FdoString * GetYColumnName();
00077
00078 ///<summary>Sets the ordinate column name for the Y ordinate</summary>
00079 /// <param name="mappingType">Input the Y ordinate column name</param>
00080 ///<returns>Returns nothing</returns>
00081 FDORDBMS_OV_API void SetYColumnName(FdoString * columnName);
00082
00083 ///<summary>Gets the ordinate column name for the Z ordinate.
00084 /// This only applies when GeometricContentType==FdoSmOvGeometricContentType_Ordinates
00085 /// and the property definition's "HasElevation" attribute is "true".
00086 /// Default value is "Z".
00087 ///</summary>
00088 ///<returns>Returns the ordinate column name for the Z ordinate</returns>
00089 FDORDBMS_OV_API FdoString * GetZColumnName();
00090
00091 ///<summary>Sets the ordinate column name for the Z ordinate</summary>
00092 /// <param name="mappingType">Input the Z ordinate column name</param>
00093 ///<returns>Returns nothing</returns>
00094 FDORDBMS_OV_API void SetZColumnName(FdoString * columnName);
00095
00096 //DOM-IGNORE-BEGIN
00097 FDORDBMS_OV_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00098 //DOM-IGNORE-END
00099
00100
00101 protected:
00102 FDORDBMS_OV_API FdoRdbmsOvGeometricPropertyDefinition();
00103 FDORDBMS_OV_API FdoRdbmsOvGeometricPropertyDefinition(FdoString* name);
00104 FDORDBMS_OV_API virtual ~FdoRdbmsOvGeometricPropertyDefinition();
00105
00106 // Sets the column override
00107 FDORDBMS_OV_API void SetColumn(FdoRdbmsOvGeometricColumn* geometricColumn);
00108
00109 FDORDBMS_OV_API virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
00110 FDORDBMS_OV_API virtual void _writeXmlContents(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
00111
00112 private:
00113 FdoPtr<FdoRdbmsOvGeometricColumn> mColumn;
00114 FdoSmOvGeometricColumnType mGeometricColumnType;
00115 FdoSmOvGeometricContentType mGeometricContentType;
00116 FdoStringP mXColumnName;
00117 FdoStringP mYColumnName;
00118 FdoStringP mZColumnName;
00119
00120 };
00121
00122 ///<summary>FdoRdbmsOvGeometricPropertyP is a FdoPtr on FdoRdbmsOvGeometricPropertyDefinition, provided for convenience.</summary>
00123 typedef FdoPtr<FdoRdbmsOvGeometricPropertyDefinition> FdoRdbmsOvGeometricPropertyP;
00124
00125 #endif
00126