FDO .NET API Reference Feature Data Objects

mgIRing.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 
00020 #pragma once
00021 
00022 #include "mgIRingAbstract.h"
00023 
00024 class FdoRingCollection;
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::IRing
00035 /// \brief
00036 /// The IRing class is ring Geometry helper type.  This is the most general non-abstract ring type.  
00037 /// FdoIRing is defined by an ordered collection of contiguous curve segments.
00038 public __gc __interface IRing : public NAMESPACE_OSGEO_GEOMETRY::IRingAbstract
00039 {
00040 public:
00041     /// \brief
00042     /// Gets the number of curve segments in this ring.  
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 RingCollection class is a collection of IRing objects.
00071 [System::Reflection::DefaultMemberAttribute("RealTypeItem")]
00072 public __gc __sealed class RingCollection 
00073     : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::IList
00074 {
00075 public:
00076     /// \brief
00077     /// Constructs a 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 element should be automatically deleted 
00084     /// once it no longer referenced.
00085     /// 
00086     RingCollection(System::IntPtr unmanaged, System::Boolean autoDelete);
00087 
00088 public private:
00089     FdoRingCollection *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         RingCollection *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(RingCollection *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 RingCollection with no contained elements.
00170     /// 
00171     /// \return
00172     /// Returns an empty collection
00173     /// 
00174     RingCollection();
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 IRing from this collection.
00216     /// 
00217     /// \param index 
00218     /// Input index of the element to remove.
00219     /// 
00220     System::Void RemoveAt(System::Int32 index);
00221     /// \brief
00222     /// Removes all elements from the collection.
00223     /// 
00224     System::Void  Clear();
00225 
00226 public:
00227     /// \brief
00228     /// Adds a IRing object into the collection.
00229     /// 
00230     /// \param value 
00231     /// Input the IRing object to add.
00232     /// 
00233     /// \return
00234     /// The position into which the new element was inserted.
00235     /// 
00236     System::Int32 Add(NAMESPACE_OSGEO_GEOMETRY::IRing* value);
00237     /// \brief
00238     /// Determines the index of a specific IRing object.
00239     /// 
00240     /// \param value 
00241     /// Input the IRing object to locate in the collection.
00242     /// 
00243     /// \return
00244     /// The index of value if found in the collection; otherwise, -1.
00245     /// 
00246     System::Int32 IndexOf(NAMESPACE_OSGEO_GEOMETRY::IRing* value);
00247     /// \brief
00248     /// Inserts an IRing object to the collection at the specified position.
00249     /// 
00250     /// \param index 
00251     /// Input the zero-based index at which value should be inserted.
00252     /// \param value 
00253     /// Input the IRing object to insert.
00254     /// 
00255     System::Void Insert(System::Int32 index, NAMESPACE_OSGEO_GEOMETRY::IRing* value); 
00256     /// \brief
00257     /// Removes the first occurrence of a specific IRing object.
00258     /// 
00259     /// \param value 
00260     /// Input the IRing object to remove from the collection.
00261     /// 
00262     System::Void Remove(NAMESPACE_OSGEO_GEOMETRY::IRing* value);
00263     /// \brief
00264     /// Determines whether the collection contains a specific IRing object.
00265     /// 
00266     /// \param value 
00267     /// Input The IRing object to locate in the collection.
00268     /// 
00269     /// \return
00270     /// True if the value is found in the collection; otherwise, false.
00271     /// 
00272     System::Boolean Contains(NAMESPACE_OSGEO_GEOMETRY::IRing* value);
00273     /// \brief
00274     /// Copies the elements of the collection to an array.
00275     /// 
00276     /// \param array 
00277     /// Output the one-dimensional Array that is the destination of the elements copied from this collection.
00278     /// \param startAt 
00279     /// Input an integer that represents the index in array at which copying begins.
00280     /// 
00281     System::Void CopyTo(NAMESPACE_OSGEO_GEOMETRY::IRing* array[],System::Int32 startAt);
00282 
00283     /// \brief
00284     /// Gets an ILineString object in the collection.
00285     /// 
00286     /// \param index 
00287     /// Input index of the ILineString object to retrieve.
00288     /// 
00289     __property NAMESPACE_OSGEO_GEOMETRY::IRing *get_RealTypeItem(System::Int32 index);
00290 
00291     /// \brief
00292     /// Sets the value of the ILineString object at the specified index
00293     /// 
00294     /// \param index 
00295     /// Input index of the ILineString object to set.
00296     /// 
00297     /// \param value 
00298     /// Input the value of the ILineString
00299     /// 
00300     __property System::Void set_RealTypeItem(System::Int32 index, NAMESPACE_OSGEO_GEOMETRY::IRing *value);
00301 
00302     /// \brief
00303     /// Gets an IPoint object in the collection.
00304     /// 
00305     /// \param index 
00306     /// Input index of the IPoint object to retrieve.
00307     /// 
00308     /// \return
00309     /// Returns the IPoint object at the specified index
00310     /// 
00311     __property NAMESPACE_OSGEO_GEOMETRY::IRing *get_Item(System::Int32 index);
00312 
00313     /// \brief
00314     /// Sets the value of the IPoint object at the specified index
00315     /// 
00316     /// \param index 
00317     /// Input index of the IPoint object to set.
00318     /// 
00319     /// \param value 
00320     /// Input the value of the IPoint object
00321     /// 
00322     __property System::Void set_Item(System::Int32 index, NAMESPACE_OSGEO_GEOMETRY::IRing *value);
00323 };
00324 
00325 END_NAMESPACE_OSGEO_GEOMETRY
00326 
00327 

Comments or suggestions? Send us feedback.