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