FDO API Reference | Feature Data Objects |
00001 #ifndef _IGEOMETRY_H_ 00002 #define _IGEOMETRY_H_ 00003 00004 // 00005 // Copyright (C) 2004-2006 Autodesk, Inc. 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of version 2.1 of the GNU Lesser 00009 // General Public License as published by the Free Software Foundation. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 // 00020 00021 00022 00023 #ifdef _WIN32 00024 #pragma once 00025 #endif 00026 00027 #include <FdoCommon.h> 00028 #include <Geometry/IEnvelope.h> 00029 #include <Common/Dimensionality.h> 00030 #include <Common/GeometryType.h> 00031 #include <Common/Collection.h> 00032 00033 /// \brief 00034 /// The FdoIGeometry class defines the properties and methods common to all geometric 00035 /// types. FdoIGeometry is an abstract type. 00036 class FdoIGeometry : public FdoIDisposable 00037 { 00038 public: 00039 00040 /// \brief 00041 /// Gets the envelope for the Geometry. 00042 /// 00043 /// \return 00044 /// Returns the envelope 00045 /// 00046 FDO_GEOM_API virtual FdoIEnvelope* GetEnvelope() const = 0; 00047 00048 /// \brief 00049 /// Gets the dimensionality of ordinates in this object. 00050 /// 00051 /// \remarks 00052 /// Values are from the FdoDimensionality enumeration. 00053 /// A return type of "FdoInt32" is used instead of the enumeration, catering to typical use with bit masking. 00054 /// 00055 /// \return 00056 /// Returns the ordinate dimensionality 00057 /// 00058 FDO_GEOM_API virtual FdoInt32 GetDimensionality() const = 0; 00059 00060 /// \brief 00061 /// Gets the type of the most-derived interface 00062 /// in the Geometry package for this object 00063 /// 00064 /// \remarks 00065 /// The derived type indicates to what class the object may safely be cast. 00066 /// 00067 /// \return 00068 /// Returns the derived type 00069 /// 00070 FDO_GEOM_API virtual FdoGeometryType GetDerivedType() const = 0; 00071 00072 /// \brief 00073 /// Gets the text string representation of this Geometry. 00074 /// 00075 /// \remarks 00076 /// This object retains ownership of the string. 00077 /// The caller should NOT attempt to free it. 00078 /// The text string may be retained in memory by the object indefinitely. 00079 /// Calling this method on a large number of Geometries that are retained 00080 /// in memory may cause a noticable increase in memory consumption. 00081 /// 00082 /// \return 00083 /// Returns the text string 00084 /// 00085 FDO_GEOM_API virtual FdoString* GetText() = 0; 00086 00087 protected: 00088 00089 /// \brief 00090 /// Constructs a default instance. 00091 /// 00092 /// \return 00093 /// Returns nothing 00094 /// 00095 FDO_GEOM_API FdoIGeometry() {}; 00096 00097 /// \brief 00098 /// Default destructor. 00099 /// 00100 /// \return 00101 /// Returns nothing 00102 /// 00103 FDO_GEOM_API virtual ~FdoIGeometry() {}; 00104 }; 00105 00106 00107 /// \brief 00108 /// Collection of CurvePolygon objects. 00109 class FdoGeometryCollection : public FdoCollection<FdoIGeometry, FdoException> 00110 { 00111 public: 00112 /// \brief 00113 /// Creates an instance of FdoGeometryCollection with no contained elements. 00114 /// 00115 /// \return 00116 /// Returns an empty collection 00117 /// 00118 static FdoGeometryCollection* Create() 00119 { 00120 FdoGeometryCollection* value = new FdoGeometryCollection(); 00121 if (NULL == value) 00122 throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC))); 00123 00124 return value; 00125 } 00126 00127 protected: 00128 void Dispose() 00129 { 00130 delete this; 00131 } 00132 }; 00133 #endif 00134 00135
Comments or suggestions? Send us feedback. |