FDO API Reference | Feature Data Objects |
00001 #ifndef _ICURVESTRING_H_ 00002 #define _ICURVESTRING_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/ICurveAbstract.h> 00028 #include <Geometry/ICurveSegmentAbstract.h> 00029 #include <Common/Collection.h> 00030 00031 /// \brief 00032 /// The FdoICurveString class is a CurveString Geometry type. FdoICurveString is the most general non-abstract curve type. 00033 /// It is defined by an ordered collection of contiguous curve segments. 00034 class FdoICurveString : public FdoICurveAbstract 00035 { 00036 public: 00037 00038 /// \brief 00039 /// Gets the number of curve segments in this curve. 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 00069 /// \brief 00070 /// Constructs a default instance. 00071 /// 00072 /// \return 00073 /// Returns nothing 00074 /// 00075 FDO_GEOM_API FdoICurveString() {}; 00076 00077 /// \brief 00078 /// Default destructor. 00079 /// 00080 /// \return 00081 /// Returns nothing 00082 /// 00083 FDO_GEOM_API virtual ~FdoICurveString() {}; 00084 00085 }; 00086 00087 00088 /// \brief 00089 /// The FdoCurveStringCollection class is a collection of CurvePolygon objects. 00090 class FdoCurveStringCollection : public FdoCollection<FdoICurveString, FdoException> 00091 { 00092 public: 00093 /// \brief 00094 /// Creates an instance of FdoCurveStringCollection with no contained elements. 00095 /// 00096 /// \return 00097 /// Returns an empty collection 00098 /// 00099 static FdoCurveStringCollection* Create() 00100 { 00101 FdoCurveStringCollection* value = new FdoCurveStringCollection(); 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. |