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