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 class FdoArgumentDefinitionCollection; 00022 00023 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES 00024 public __gc class ArgumentDefinition; 00025 00026 /// \ingroup (OSGeoFDOConnectionsCapabilities) 00027 /// \brief 00028 /// ArgumentDefinitionCollection is a collection of ArgumentDefinition objects. 00029 [System::Reflection::DefaultMemberAttribute("RealTypeItem")] 00030 public __sealed __gc class ArgumentDefinitionCollection : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::IList 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 ArgumentDefinitionCollection* 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(ArgumentDefinitionCollection* 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 ArgumentDefinitionCollection(System::IntPtr unmanaged, System::Boolean autoDelete); 00108 00109 inline FdoArgumentDefinitionCollection* GetImpObj(); 00110 00111 private: 00112 // System::Collections::ICollection interface properties 00113 __property System::Object* System::Collections::ICollection::get_SyncRoot(); 00114 __property System::Boolean System::Collections::ICollection::get_IsSynchronized(); 00115 00116 // System::Collections::ICollection interface methods 00117 System::Void System::Collections::ICollection::CopyTo(System::Array* array,System::Int32 index); 00118 00119 // System::Collections::IList interface properties 00120 __property System::Boolean System::Collections::IList::get_IsFixedSize(); 00121 __property System::Boolean System::Collections::IList::get_IsReadOnly(); 00122 __property Object* System::Collections::IList::get_Item(System::Int32 index); 00123 __property System::Void System::Collections::IList::set_Item(System::Int32 index, Object* value); 00124 00125 // System::Collections::IList interface methods 00126 System::Int32 System::Collections::IList::Add(Object* value); 00127 System::Boolean System::Collections::IList::Contains(Object* value); 00128 System::Int32 System::Collections::IList::IndexOf(Object* value); 00129 System::Void System::Collections::IList::Insert(System::Int32 index, Object* value); 00130 System::Void System::Collections::IList::Remove(Object* value); 00131 /// \endcond 00132 00133 public: 00134 ArgumentDefinitionCollection(); 00135 00136 /// \brief 00137 /// Gets the count of items in collection. 00138 /// 00139 /// \return 00140 /// Returns the number of items in the collection. 00141 /// 00142 __property System::Int32 get_Count(System::Void); 00143 00144 /// \brief 00145 /// Gets an enumerator that can iterate through a collection. 00146 /// 00147 /// \return 00148 /// Returns an enumerator on the dictionary. 00149 /// 00150 __sealed System::Collections::IEnumerator* GetEnumerator(System::Void); 00151 00152 /// \brief 00153 /// Removes the index-th ArgumentDefinition from this collection. 00154 /// 00155 /// \param index 00156 /// Input index of the element to remove. 00157 /// 00158 System::Void RemoveAt(System::Int32 index); 00159 00160 /// \brief 00161 /// Removes all elements from the collection. 00162 /// 00163 System::Void Clear(); 00164 00165 /// \brief 00166 /// Adds a ArgumentDefinition object into the collection. 00167 /// 00168 /// \param value 00169 /// Input the ArgumentDefinition object to add. 00170 /// 00171 /// \return 00172 /// Returns the position into which the new element was inserted. 00173 /// 00174 System::Int32 Add(ArgumentDefinition* value); 00175 00176 /// \brief 00177 /// Determines the index of a specific ArgumentDefinition object. 00178 /// 00179 /// \param value 00180 /// Input the ArgumentDefinition object to locate in the collection. 00181 /// 00182 /// \return 00183 /// The index of value if found in the collection; otherwise, -1. 00184 /// 00185 System::Int32 IndexOf(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinition* value); 00186 00187 /// \brief 00188 /// Inserts a ArgumentDefinition object into the collection at the specified position. 00189 /// 00190 /// \param index 00191 /// Input the zero-based index at which value should be inserted. 00192 /// \param value 00193 /// Input the ArgumentDefinition object to insert. 00194 /// 00195 System::Void Insert(System::Int32 index, ArgumentDefinition* value); 00196 00197 /// \brief 00198 /// Removes the first occurrence of a specific ArgumentDefinition object. 00199 /// 00200 /// \param value 00201 /// Input the ArgumentDefinition object to remove from the collection. 00202 /// 00203 System::Void Remove(ArgumentDefinition* value); 00204 00205 /// \brief 00206 /// Determines whether the collection contains a specific ArgumentDefinition object. 00207 /// 00208 /// \param value 00209 /// Input The ArgumentDefinition object to search in the collection. 00210 /// 00211 /// \return 00212 /// Returns true if the value is found in the collection; otherwise, false. 00213 /// 00214 System::Boolean Contains(ArgumentDefinition* value); 00215 00216 /// \brief 00217 /// Copies the elements of the collection to an array. 00218 /// 00219 /// \param array 00220 /// Output the one-dimensional Array that is the destination of the elements copied from this collection. 00221 /// 00222 /// \param startAt 00223 /// Input an integer that represents the index in array at which copying begins. 00224 /// 00225 System::Void CopyTo(ArgumentDefinition* array[],System::Int32 startAt); 00226 00227 /// \brief 00228 /// Gets the item in the collection at the specified index. 00229 /// 00230 /// \param index 00231 /// The index of the item in the collection. The index is 0 based. 00232 /// 00233 /// \return 00234 /// Returns an instance of a the collected item. 00235 /// Throws an instance of Exception if the index is out of range or an error occurs. 00236 /// 00237 __property ArgumentDefinition* get_RealTypeItem(System::Int32 index); 00238 00239 /// \brief 00240 /// Sets the value of the item at the specified index 00241 /// 00242 /// \param index 00243 /// Input index of the item to set. 00244 /// 00245 /// \param value 00246 /// Input the value of the item 00247 /// 00248 __property System::Void set_RealTypeItem(System::Int32 index, ArgumentDefinition* value); 00249 00250 /// \brief 00251 /// Gets an item in the collection. 00252 /// 00253 /// \param index 00254 /// Input index of the item to retrieve. 00255 /// 00256 /// \return 00257 /// Returns the item at the specified index 00258 /// 00259 __property ArgumentDefinition* get_Item(System::Int32 index); 00260 00261 /// \brief 00262 /// Sets the value of the item at the specified index 00263 /// 00264 /// \param index 00265 /// Input index of the item to set. 00266 /// 00267 /// \param value 00268 /// Input the value of the item 00269 /// 00270 __property System::Void set_Item(System::Int32 index, ArgumentDefinition* value); 00271 00272 /// \cond DOXYGEN-IGNORE 00273 protected: 00274 System::Void ReleaseUnmanagedObject(); 00275 /// \endcond 00276 }; 00277 00278 END_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES 00279 00280
Comments or suggestions? Send us feedback. |