FDO .NET API Reference | Feature Data Objects |
00001 /* 00002 * Copyright (C) 2004-2006 Autodesk, Inc. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of version 2.1 of the GNU Lesser 00006 * General Public License as published by the Free Software Foundation. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 */ 00018 00019 #pragma once 00020 00021 #include "mgISurfaceAbstract.h" 00022 00023 class FdoCurvePolygonCollection; 00024 00025 BEGIN_NAMESPACE_OSGEO_GEOMETRY 00026 public __gc __interface IRing; 00027 END_NAMESPACE_OSGEO_GEOMETRY 00028 00029 BEGIN_NAMESPACE_OSGEO_GEOMETRY 00030 00031 /// \ingroup (OSGeoFDOGeometry) 00032 /// \interface OSGeo::FDO::Geometry::ICurvePolygon 00033 /// \brief 00034 /// The ICurvePolygon class is a CurvePolygon geometry type. 00035 /// This type is defined by one exterior boundary and zero or more 00036 /// interior boundaries. 00037 /// Each of the boundaries must be a closed, simple Ring. 00038 public __gc __interface ICurvePolygon : public NAMESPACE_OSGEO_GEOMETRY::ISurfaceAbstract 00039 { 00040 public: 00041 /// \brief 00042 /// Gets the ring defining the outer boundary. 00043 /// 00044 /// \return 00045 /// Returns the exterior ring 00046 /// 00047 __property NAMESPACE_OSGEO_GEOMETRY::IRing *get_ExteriorRing(); 00048 00049 /// \brief 00050 /// Gets the number of interior rings. 00051 /// 00052 /// \return 00053 /// Returns the number of interior rings 00054 /// 00055 __property System::Int32 get_InteriorRingCount(); 00056 00057 /// \brief 00058 /// Gets the interior ring at the specified (zero-based) index. 00059 /// 00060 /// \param index 00061 /// Input Zero-based index in the object's list of interior rings. 00062 /// 00063 /// \return 00064 /// Returns the interior ring 00065 /// 00066 __property NAMESPACE_OSGEO_GEOMETRY::IRing *get_InteriorRing(System::Int32 index); 00067 }; 00068 00069 00070 /// \brief 00071 /// The CurvePolygonCollection class is a collection of CurvePolygon objects. 00072 [System::Reflection::DefaultMemberAttribute("RealTypeItem")] 00073 public __gc __sealed class CurvePolygonCollection 00074 : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::IList 00075 { 00076 public: 00077 /// \brief 00078 /// Constructs a CurvePolygonCollection managed object based on an unmanaged instance of the object 00079 /// 00080 /// \param unmanaged 00081 /// Input A Pointer to the unmanaged object. 00082 /// 00083 /// \param autoDelete 00084 /// Input Indicates if the constructed object should be automatically deleted 00085 /// once it no longer referenced. 00086 /// 00087 CurvePolygonCollection(System::IntPtr unmanaged, System::Boolean autoDelete); 00088 00089 public private: 00090 FdoCurvePolygonCollection *GetImpObj(); 00091 00092 /// \cond DOXYGEN-IGNORE 00093 protected: 00094 __sealed System::Void ReleaseUnmanagedObject(); 00095 00096 private: 00097 /// \brief 00098 /// A Nested class defined to provide enumeration of Dictionary elements 00099 /// 00100 /// Enumerators can be used to read the data in the collection, 00101 /// but they cannot be used to modify the underlying collection. 00102 /// 00103 /// An enumerator remains valid as long as the collection remains unchanged. 00104 /// If changes are made to the collection, such as adding, modifying, or deleting 00105 /// elements, the enumerator is irrecoverably invalidated and the next call to 00106 /// MoveNext or Reset throws an InvalidOperationException. If the collection is 00107 /// modified between MoveNext and Current, Current returns the element that it is 00108 /// set to, even if the enumerator is already invalidated. 00109 /// 00110 /// The enumerator does not have exclusive access to the collection; therefore, 00111 /// enumerating through a collection is intrinsically not a thread-safe procedure. 00112 /// Even when a collection is synchronized, other threads can still modify the 00113 /// collection, which causes the enumerator to throw an exception. To guarantee 00114 /// thread safety during enumeration, you can either lock the collection during 00115 /// the entire enumeration or catch the exceptions resulting from changes made 00116 /// by other threads. 00117 /// 00118 __gc class Enumerator : public System::Collections::IEnumerator 00119 { 00120 CurvePolygonCollection *m_pCol; 00121 System::Int32 m_nIdx; 00122 00123 public: 00124 /// \brief 00125 /// Constructs a new Collection Enumerator 00126 /// 00127 /// \param col 00128 /// Input The collection to enumerate. 00129 /// 00130 Enumerator(CurvePolygonCollection *col) 00131 : m_pCol(col), m_nIdx(-1) 00132 {} 00133 00134 /// \brief 00135 /// Retrieves the current object at the enumerator location 00136 /// 00137 /// \return 00138 /// Retuns the current object referenced by the enumerator 00139 /// 00140 __property System::Object *get_Current(); 00141 00142 /// \brief 00143 /// Initially, the enumerator is positioned before the first object in the collection. 00144 /// At this position, calling the Current property throws an exception. 00145 /// Therefore, you must call the MoveNext method to advance the enumerator 00146 /// to the first element of the collection before reading the value of Current. 00147 /// If MoveNext passes the end of the collection, the enumerator is positioned 00148 /// after the last element in the collection and MoveNext returns false. 00149 /// When the enumerator is at this position, subsequent calls to MoveNext also return false. 00150 /// If the last call to MoveNext returned false, calling Current throws an exception. 00151 /// To set Current to the first element of the collection again, you can call Reset 00152 /// followed by MoveNext. 00153 /// 00154 /// \return 00155 /// Retuns true if the Enumerator is able to move to a valid element 00156 /// otherwise false. 00157 /// 00158 System::Boolean MoveNext(); 00159 00160 /// \brief 00161 /// Initially, the enumerator is positioned before the first element in the collection. 00162 /// The Reset method brings the enumerator back to this position. 00163 /// 00164 System::Void Reset(); 00165 }; 00166 /// \endcond 00167 00168 public: 00169 /// \brief 00170 /// Creates an instance of CurveSegmentCollection with no contained elements. 00171 /// 00172 /// \return 00173 /// Returns an empty collection 00174 /// 00175 CurvePolygonCollection(); 00176 00177 private: 00178 // System::Collections::ICollection interface properties 00179 __property System::Object* System::Collections::ICollection::get_SyncRoot(); 00180 __property System::Boolean System::Collections::ICollection::get_IsSynchronized(); 00181 00182 // System::Collections::ICollection interface methods 00183 System::Void System::Collections::ICollection::CopyTo(System::Array* array,System::Int32 index); 00184 00185 // System::Collections::IList interface properties 00186 __property System::Boolean System::Collections::IList::get_IsFixedSize(); 00187 __property System::Boolean System::Collections::IList::get_IsReadOnly(); 00188 __property Object* System::Collections::IList::get_Item(System::Int32 index); 00189 __property System::Void System::Collections::IList::set_Item(System::Int32 index, Object* value); 00190 00191 // System::Collections::IList interface methods 00192 System::Int32 System::Collections::IList::Add(Object* value); 00193 System::Boolean System::Collections::IList::Contains(Object* value); 00194 System::Int32 System::Collections::IList::IndexOf(Object* value); 00195 System::Void System::Collections::IList::Insert(System::Int32 index, Object* value); 00196 System::Void System::Collections::IList::Remove(Object* value); 00197 00198 public: 00199 /// \brief 00200 /// Gets the count of items in collection. 00201 /// 00202 /// \return 00203 /// Returns the number of items in the collection. 00204 /// 00205 __property System::Int32 get_Count(System::Void); 00206 00207 /// \brief 00208 /// Gets an enumerator that can iterate through a collection. 00209 /// 00210 /// \return 00211 /// Returns an enumerator on the dictionary. 00212 /// 00213 __sealed System::Collections::IEnumerator* GetEnumerator(System::Void); 00214 00215 /// \brief 00216 /// Removes the index-th ICurvePolygon from this collection. 00217 /// 00218 /// \param index 00219 /// Input index of the element to remove. 00220 /// 00221 System::Void RemoveAt(System::Int32 index); 00222 00223 /// \brief 00224 /// Removes all elements from the collection. 00225 /// 00226 System::Void Clear(); 00227 00228 public: 00229 /// \brief 00230 /// Adds a ICurvePolygon object into the collection. 00231 /// 00232 /// \param value 00233 /// Input the ICurvePolygon object to add. 00234 /// 00235 /// \return 00236 /// The position into which the new element was inserted. 00237 /// 00238 System::Int32 Add(NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon* value); 00239 00240 /// \brief 00241 /// Determines the index of a specific ICurvePolygon object. 00242 /// 00243 /// \param value 00244 /// Input the ICurvePolygon object to locate in the collection. 00245 /// 00246 /// \return 00247 /// The index of value if found in the collection; otherwise, -1. 00248 /// 00249 System::Int32 IndexOf(NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon* value); 00250 00251 /// \brief 00252 /// Inserts an ICurvePolygon object to the collection at the specified position. 00253 /// 00254 /// \param index 00255 /// Input the zero-based index at which value should be inserted. 00256 /// \param value 00257 /// Input the ICurvePolygon object to insert. 00258 /// 00259 System::Void Insert(System::Int32 index, NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon* value); 00260 00261 /// \brief 00262 /// Removes the first occurrence of a specific ICurvePolygon object. 00263 /// 00264 /// \param value 00265 /// Input the ICurvePolygon object to remove from the collection. 00266 /// 00267 System::Void Remove(NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon* value); 00268 00269 /// \brief 00270 /// Determines whether the collection contains a specific ICurvePolygon object. 00271 /// 00272 /// \param value 00273 /// Input The ICurvePolygon object to locate in the collection. 00274 /// 00275 /// \return 00276 /// True if the value is found in the collection; otherwise, false. 00277 /// 00278 System::Boolean Contains(NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon* value); 00279 00280 /// \brief 00281 /// Copies the elements of the collection to an array. 00282 /// 00283 /// \param array 00284 /// Output the one-dimensional Array that is the destination of the elements copied from this collection. 00285 /// \param startAt 00286 /// Input an integer that represents the index in array at which copying begins. 00287 /// 00288 System::Void CopyTo(NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon* array[],System::Int32 startAt); 00289 00290 /// \brief 00291 /// Gets an ICurvePolygon in the collection. 00292 /// 00293 /// \param index 00294 /// Input index of the ICurvePolygon to retrieve. 00295 /// 00296 __property NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon *get_RealTypeItem(System::Int32 index); 00297 00298 /// \brief 00299 /// Sets the value of the ICurvePolygon at the specified index 00300 /// 00301 /// \param index 00302 /// Input index of the ICurvePolygon to set. 00303 /// 00304 /// \param value 00305 /// Input the value of the ICurvePolygon 00306 /// 00307 __property System::Void set_RealTypeItem(System::Int32 index, NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon *value); 00308 00309 /// \brief 00310 /// Gets an ICurvePolygon in the collection. 00311 /// 00312 /// \param index 00313 /// Input index of the ICurvePolygon to retrieve. 00314 /// 00315 /// \return 00316 /// Returns the ICurvePolygon at the specified index 00317 /// 00318 __property NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon *get_Item(System::Int32 index); 00319 00320 /// \brief 00321 /// Sets the value of the ICurvePolygon at the specified index 00322 /// 00323 /// \param index 00324 /// Input index of the ICurvePolygon to set. 00325 /// 00326 /// \param value 00327 /// Input the value of the ICurvePolygon 00328 /// 00329 __property System::Void set_Item(System::Int32 index, NAMESPACE_OSGEO_GEOMETRY::ICurvePolygon *value); 00330 }; 00331 00332 END_NAMESPACE_OSGEO_GEOMETRY 00333 00334
Comments or suggestions? Send us feedback. |