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