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