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