FDO .NET API Reference Feature Data Objects

mgReadOnlyArgDefColl.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 FdoReadOnlyArgumentDefinitionCollection;
00022 
00023 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES
00024 public __gc class ArgumentDefinition;
00025 
00026 /// \ingroup (OSGeoFDOConnectionsCapabilities)
00027 /// \brief
00028 /// ReadOnlyArgumentDefinitionCollection is a collection of ReadOnlyArgumentDefinition objects.
00029 [System::Reflection::DefaultMemberAttribute("RealTypeItem")]
00030 public __sealed __gc class ReadOnlyArgumentDefinitionCollection : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::ICollection, public System::Collections::IEnumerable
00031 {
00032 /// \cond DOXYGEN-IGNORE
00033 private:
00034     /// \brief
00035     /// A Nested class defined to provide enumeration of Dictionary elements
00036     ///
00037     /// Enumerators can be used to read the data in the collection, 
00038     /// but they cannot be used to modify the underlying collection.
00039     ///
00040     /// An enumerator remains valid as long as the collection remains unchanged. 
00041     /// If changes are made to the collection, such as adding, modifying, or deleting 
00042     /// elements, the enumerator is irrecoverably invalidated and the next call to 
00043     /// MoveNext or Reset throws an InvalidOperationException. If the collection is 
00044     /// modified between MoveNext and Current, Current returns the element that it is 
00045     /// set to, even if the enumerator is already invalidated.
00046     ///
00047     /// The enumerator does not have exclusive access to the collection; therefore, 
00048     /// enumerating through a collection is intrinsically not a thread-safe procedure. 
00049     /// Even when a collection is synchronized, other threads can still modify the 
00050     /// collection, which causes the enumerator to throw an exception. To guarantee 
00051     /// thread safety during enumeration, you can either lock the collection during 
00052     /// the entire enumeration or catch the exceptions resulting from changes made 
00053     /// by other threads.
00054     /// 
00055     __gc class Enumerator : public System::Collections::IEnumerator
00056     {
00057     private:
00058         ReadOnlyArgumentDefinitionCollection* m_pCol;
00059         System::Int32 m_nIdx;
00060 
00061     public:
00062         /// \brief
00063         /// Constructs a new Collection Enumerator
00064         /// 
00065         /// \param col 
00066         /// Input The collection to enumerate.
00067         /// 
00068         Enumerator(ReadOnlyArgumentDefinitionCollection* elements) : m_pCol(elements), m_nIdx(-1) 
00069         {
00070 
00071         }
00072 
00073         /// \brief
00074         /// Retrieves the current object at the enumerator location
00075         /// 
00076         /// \return
00077         /// Retuns the current object referenced by the enumerator
00078         /// 
00079         __property System::Object *get_Current();
00080 
00081         /// \brief
00082         /// Initially, the enumerator is positioned before the first object in the collection. 
00083         /// At this position, calling the Current property throws an exception. 
00084         /// Therefore, you must call the MoveNext method to advance the enumerator 
00085         /// to the first element of the collection before reading the value of Current.
00086         /// If MoveNext passes the end of the collection, the enumerator is positioned 
00087         /// after the last element in the collection and MoveNext returns false. 
00088         /// When the enumerator is at this position, subsequent calls to MoveNext also return false. 
00089         /// If the last call to MoveNext returned false, calling Current throws an exception. 
00090         /// To set Current to the first element of the collection again, you can call Reset 
00091         /// followed by MoveNext.
00092         /// 
00093         /// \return
00094         /// Retuns true if the Enumerator is able to move to a valid element
00095         /// otherwise false.
00096         /// 
00097         System::Boolean MoveNext();
00098 
00099         /// \brief
00100         /// Initially, the enumerator is positioned before the first element in the collection. 
00101         /// The Reset method brings the enumerator back to this position. 
00102         /// 
00103         System::Void Reset();
00104     };
00105 
00106 public private:
00107     ReadOnlyArgumentDefinitionCollection(System::IntPtr unmanaged, System::Boolean autoDelete);
00108 
00109     inline FdoReadOnlyArgumentDefinitionCollection* GetImpObj();
00110 
00111 private:
00112     // System::Collections::ICollection methods
00113     System::Void System::Collections::ICollection::CopyTo(System::Array* array,System::Int32 index);
00114 
00115     // System::Collections::ICollection properties
00116     __property System::Object* System::Collections::ICollection::get_SyncRoot();
00117     __property System::Boolean System::Collections::ICollection::get_IsSynchronized();
00118 /// \endcond
00119 
00120 public:
00121     ReadOnlyArgumentDefinitionCollection();
00122 
00123     /// \brief
00124     /// Gets the count of items in collection.
00125     /// 
00126     /// \return
00127     /// Returns the number of items in the collection.
00128     /// 
00129     __property System::Int32 get_Count(System::Void);   
00130 
00131     /// \brief
00132     /// Gets an enumerator that can iterate through a collection.
00133     /// 
00134     /// \return
00135     /// Returns an enumerator on the dictionary.
00136     /// 
00137     __sealed System::Collections::IEnumerator* GetEnumerator(System::Void);
00138 
00139     /// \brief
00140     /// Copies the elements of the collection to an array.
00141     /// 
00142     /// \param array 
00143     /// Output the one-dimensional Array that is the destination of the elements copied from this collection.
00144     ///
00145     /// \param startAt 
00146     /// Input an integer that represents the index in array at which copying begins.
00147     /// 
00148     System::Void CopyTo(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinition* array[], System::Int32 startAt);
00149 
00150     /// \brief
00151     /// Determines the index of a specific ArgumentDefinition object.
00152     /// 
00153     /// \param value 
00154     /// Input the ArgumentDefinition object to locate in the collection.
00155     /// 
00156     /// \return
00157     /// The index of value if found in the collection; otherwise, -1.
00158     /// 
00159     System::Int32 IndexOf(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinition* value);
00160 
00161     /// \brief
00162     /// Determines whether the collection contains a specific ArgumentDefinition object.
00163     /// 
00164     /// \param value 
00165     /// Input The ArgumentDefinition object to search in the collection.
00166     /// 
00167     /// \return
00168     /// Returns true if the value is found in the collection; otherwise, false.
00169     /// 
00170     System::Boolean Contains(ArgumentDefinition* value);
00171 
00172     /// \brief
00173     /// Gets the item in the collection at the specified index. 
00174     /// 
00175     /// \param index 
00176     /// The index of the item in the collection. The index is 0 based.
00177     /// 
00178     /// \return
00179     /// Returns an instance of a the collected item.
00180     /// Throws an instance of Exception if the index is out of range or an error occurs.
00181     /// 
00182     __property ArgumentDefinition* get_RealTypeItem(System::Int32 index);
00183 
00184     /// \brief
00185     /// Gets the item in the collection at the specified index. 
00186     /// 
00187     /// \param name 
00188     /// The name of the item in the collection.
00189     /// 
00190     /// \return
00191     /// Returns an instance of a the collected item.
00192     /// 
00193     __property ArgumentDefinition* get_RealTypeItem(System::String* name);
00194 
00195 /// \cond DOXYGEN-IGNORE
00196 protected:
00197     System::Void ReleaseUnmanagedObject();
00198 /// \endcond
00199 };
00200 
00201 END_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES
00202 
00203 

Comments or suggestions? Send us feedback.