FDO API Reference | Feature Data Objects |
00001 #ifndef _IRING_H_ 00002 #define _IRING_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/IRingAbstract.h> 00028 #include <Geometry/ICurveSegmentAbstract.h> 00029 #include <Common/Collection.h> 00030 00031 /// \brief 00032 /// The FdoIRing class is ring Geometry helper type. This is the most general non-abstract ring type. 00033 /// FdoIRing is defined by an ordered collection of contiguous curve segments. 00034 class FdoIRing : public FdoIRingAbstract 00035 { 00036 public: 00037 00038 /// \brief 00039 /// Gets the number of curve segments in this ring. 00040 /// 00041 /// \return 00042 /// Returns the number of curve segments 00043 /// 00044 FDO_GEOM_API virtual FdoInt32 GetCount() const = 0; 00045 00046 /// \brief 00047 /// Gets the curve segment at the given zero-based index. 00048 /// 00049 /// \param index 00050 /// Input Zero-based index in the object's list of curve segments. 00051 /// 00052 /// \return 00053 /// Returns the requested curve segment 00054 /// 00055 FDO_GEOM_API virtual FdoICurveSegmentAbstract* GetItem( 00056 FdoInt32 index) const = 0; 00057 00058 /// \brief 00059 /// Gets all the curve segments. 00060 /// 00061 /// \return 00062 /// Returns a collection of all the curve segments 00063 /// 00064 FDO_GEOM_API virtual FdoCurveSegmentCollection * GetCurveSegments() const = 0; 00065 00066 protected: 00067 00068 /// \brief 00069 /// Constructs a default instance. 00070 /// 00071 /// \return 00072 /// Returns nothing 00073 /// 00074 FDO_GEOM_API FdoIRing() {}; 00075 00076 /// \brief 00077 /// Default destructor. 00078 /// 00079 /// \return 00080 /// Returns nothing 00081 /// 00082 FDO_GEOM_API virtual ~FdoIRing() {}; 00083 }; 00084 00085 00086 /// \brief 00087 /// The FdoRingCollection class is a collection of CurvePolygon objects. 00088 class FdoRingCollection : public FdoCollection<FdoIRing, FdoException> 00089 { 00090 public: 00091 /// \brief 00092 /// Creates an instance of FdoRingCollection with no contained elements. 00093 /// 00094 /// \return 00095 /// Returns an empty collection 00096 /// 00097 static FdoRingCollection* Create() 00098 { 00099 FdoRingCollection* value = new FdoRingCollection(); 00100 if (NULL == value) 00101 throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC))); 00102 00103 return value; 00104 } 00105 00106 protected: 00107 void Dispose() 00108 { 00109 delete this; 00110 } 00111 }; 00112 #endif 00113 00114
Comments or suggestions? Send us feedback. |