FDO .NET API Reference Feature Data Objects

mgIDirectPosition.h

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

Comments or suggestions? Send us feedback.