FDO API Reference | Feature Data Objects |
00001 #ifndef _IPOLYGON_H_ 00002 #define _IPOLYGON_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 <Geometry/ISurfaceAbstract.h> 00028 #include <Geometry/ILinearRing.h> 00029 #include <Common/Collection.h> 00030 00031 /// \brief 00032 /// The FdoIPolygon class is a polygon Geometry type. 00033 /// FdoIPolygon is defined by one exterior boundary and zero or more 00034 /// interior boundaries. 00035 /// Each of the boundaries must be a closed, simple LinearRing. 00036 class FdoIPolygon : public FdoISurfaceAbstract 00037 { 00038 public: 00039 00040 /// \brief 00041 /// Gets the ring defining the outer boundary. 00042 /// 00043 /// \return 00044 /// Returns the exterior ring 00045 /// 00046 FDO_GEOM_API virtual FdoILinearRing* GetExteriorRing() const = 0; 00047 00048 /// \brief 00049 /// Gets the number of interior rings. 00050 /// 00051 /// \return 00052 /// Returns the number of interior rings 00053 /// 00054 FDO_GEOM_API virtual FdoInt32 GetInteriorRingCount() const = 0; 00055 00056 /// \brief 00057 /// Gets the interior ring at the specified (zero-based) index. 00058 /// 00059 /// \param index 00060 /// Input Zero-based index in the object's list of interior rings. 00061 /// 00062 /// \return 00063 /// Returns the interior ring 00064 /// 00065 FDO_GEOM_API virtual FdoILinearRing* GetInteriorRing( 00066 FdoInt32 index) const = 0; 00067 00068 protected: 00069 00070 /// \brief 00071 /// Constructs a default instance. 00072 /// 00073 /// \return 00074 /// Returns nothing 00075 /// 00076 FDO_GEOM_API FdoIPolygon() {}; 00077 00078 /// \brief 00079 /// Default destructor. 00080 /// 00081 /// \return 00082 /// Returns nothing 00083 /// 00084 FDO_GEOM_API virtual ~FdoIPolygon() {}; 00085 }; 00086 00087 00088 /// \brief 00089 /// The FdoPolygonCollection class is a collection of CurvePolygon objects. 00090 class FdoPolygonCollection : public FdoCollection<FdoIPolygon, FdoException> 00091 { 00092 public: 00093 /// \brief 00094 /// Creates an instance of FdoPolygonCollection with no contained elements. 00095 /// 00096 /// \return 00097 /// Returns an empty collection 00098 /// 00099 static FdoPolygonCollection* Create() 00100 { 00101 FdoPolygonCollection* value = new FdoPolygonCollection(); 00102 if (NULL == value) 00103 throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC))); 00104 00105 return value; 00106 } 00107 00108 protected: 00109 void Dispose() 00110 { 00111 delete this; 00112 } 00113 }; 00114 #endif 00115 00116
Comments or suggestions? Send us feedback. |