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 FdoDataValueCollection; 00022 00023 BEGIN_NAMESPACE_OSGEO_FDO_EXPRESSION 00024 public __gc class DataValue; 00025 END_NAMESPACE_OSGEO_FDO_EXPRESSION 00026 00027 using namespace NAMESPACE_OSGEO_FDO_EXPRESSION; 00028 00029 BEGIN_NAMESPACE_OSGEO_FDO_RASTER 00030 00031 /// \ingroup (OSGeoFDORaster) 00032 /// \brief 00033 /// DataValueCollection is a collection of DataValue objects. 00034 [System::Reflection::DefaultMemberAttribute("RealTypeItem")] 00035 public __sealed __gc class DataValueCollection : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::IList 00036 { 00037 /// \cond DOXYGEN-IGNORE 00038 private: 00039 /// \brief 00040 /// A Nested class defined to provide enumeration of Dictionary elements 00041 /// 00042 /// Enumerators can be used to read the data in the collection, 00043 /// but they cannot be used to modify the underlying collection. 00044 /// 00045 /// An enumerator remains valid as long as the collection remains unchanged. 00046 /// If changes are made to the collection, such as adding, modifying, or deleting 00047 /// elements, the enumerator is irrecoverably invalidated and the next call to 00048 /// MoveNext or Reset throws an InvalidOperationException. If the collection is 00049 /// modified between MoveNext and Current, Current returns the element that it is 00050 /// set to, even if the enumerator is already invalidated. 00051 /// 00052 /// The enumerator does not have exclusive access to the collection; therefore, 00053 /// enumerating through a collection is intrinsically not a thread-safe procedure. 00054 /// Even when a collection is synchronized, other threads can still modify the 00055 /// collection, which causes the enumerator to throw an exception. To guarantee 00056 /// thread safety during enumeration, you can either lock the collection during 00057 /// the entire enumeration or catch the exceptions resulting from changes made 00058 /// by other threads. 00059 /// 00060 __gc class Enumerator : public System::Collections::IEnumerator 00061 { 00062 private: 00063 DataValueCollection* m_pCol; 00064 System::Int32 m_nIdx; 00065 00066 public: 00067 /// \brief 00068 /// Constructs a new Collection Enumerator 00069 /// 00070 /// \param col 00071 /// Input The collection to enumerate. 00072 /// 00073 Enumerator(DataValueCollection* elements) : m_pCol(elements), m_nIdx(-1) 00074 { 00075 00076 } 00077 00078 /// \brief 00079 /// Retrieves the current object at the enumerator location 00080 /// 00081 /// \return 00082 /// Retuns the current object referenced by the enumerator 00083 /// 00084 __property System::Object *get_Current(); 00085 00086 /// \brief 00087 /// Initially, the enumerator is positioned before the first object in the collection. 00088 /// At this position, calling the Current property throws an exception. 00089 /// Therefore, you must call the MoveNext method to advance the enumerator 00090 /// to the first element of the collection before reading the value of Current. 00091 /// If MoveNext passes the end of the collection, the enumerator is positioned 00092 /// after the last element in the collection and MoveNext returns false. 00093 /// When the enumerator is at this position, subsequent calls to MoveNext also return false. 00094 /// If the last call to MoveNext returned false, calling Current throws an exception. 00095 /// To set Current to the first element of the collection again, you can call Reset 00096 /// followed by MoveNext. 00097 /// 00098 /// \return 00099 /// Retuns true if the Enumerator is able to move to a valid element 00100 /// otherwise false. 00101 /// 00102 System::Boolean MoveNext(); 00103 00104 /// \brief 00105 /// Initially, the enumerator is positioned before the first element in the collection. 00106 /// The Reset method brings the enumerator back to this position. 00107 /// 00108 System::Void Reset(); 00109 }; 00110 00111 public private: 00112 inline FdoDataValueCollection* 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 /// \endcond 00135 00136 public: 00137 /// \brief 00138 /// The defaut constructor for the object 00139 /// 00140 DataValueCollection(); 00141 00142 /// \brief 00143 /// Constructs a DataValueCollection object based on an unmanaged instance of the object 00144 /// 00145 /// \param unmanaged 00146 /// Input A Pointer to the unmanaged object. 00147 /// 00148 /// \param autoDelete 00149 /// Input Indicates if the constructed object should be automatically deleted 00150 /// once it no longer referenced. 00151 /// 00152 DataValueCollection(System::IntPtr unmanaged, System::Boolean autoDelete); 00153 00154 /// \brief 00155 /// Gets the count of items in collection. 00156 /// 00157 /// \return 00158 /// Returns the number of items in the collection. 00159 /// 00160 __property System::Int32 get_Count(System::Void); 00161 00162 /// \brief 00163 /// Gets an enumerator that can iterate through a collection. 00164 /// 00165 /// \return 00166 /// Returns an enumerator on the dictionary. 00167 /// 00168 __sealed System::Collections::IEnumerator* GetEnumerator(System::Void); 00169 00170 /// \brief 00171 /// Removes the index-th DataValue from this collection. 00172 /// 00173 /// \param index 00174 /// Input index of the element to remove. 00175 /// 00176 System::Void RemoveAt(System::Int32 index); 00177 00178 /// \brief 00179 /// Removes all elements from the collection. 00180 /// 00181 System::Void Clear(); 00182 00183 /// \brief 00184 /// Adds a DataValue object into the collection. 00185 /// 00186 /// \param value 00187 /// Input the DataValue object to add. 00188 /// 00189 /// \return 00190 /// Returns the position into which the new element was inserted. 00191 /// 00192 System::Int32 Add(DataValue* value); 00193 00194 /// \brief 00195 /// Determines the index of a specific DataValue object. 00196 /// 00197 /// \param value 00198 /// Input the DataValue object to locate in the collection. 00199 /// 00200 /// \return 00201 /// The index of value if found in the collection; otherwise, -1. 00202 /// 00203 System::Int32 IndexOf(DataValue* value); 00204 00205 /// \brief 00206 /// Inserts a DataValue object into the collection at the specified position. 00207 /// 00208 /// \param index 00209 /// Input the zero-based index at which value should be inserted. 00210 /// \param value 00211 /// Input the DataValue object to insert. 00212 /// 00213 System::Void Insert(System::Int32 index, DataValue* value); 00214 00215 /// \brief 00216 /// Removes the first occurrence of a specific DataValue object. 00217 /// 00218 /// \param value 00219 /// Input the DataValue object to remove from the collection. 00220 /// 00221 System::Void Remove(DataValue* value); 00222 00223 /// \brief 00224 /// Determines whether the collection contains a specific DataValue object. 00225 /// 00226 /// \param value 00227 /// Input The DataValue object to search in the collection. 00228 /// 00229 /// \return 00230 /// Returns true if the value is found in the collection; otherwise, false. 00231 /// 00232 System::Boolean Contains(DataValue* value); 00233 00234 /// \brief 00235 /// Copies the elements of the collection to an array. 00236 /// 00237 /// \param array 00238 /// Output the one-dimensional Array that is the destination of the elements copied from this collection. 00239 /// 00240 /// \param startAt 00241 /// Input an integer that represents the index in array at which copying begins. 00242 /// 00243 System::Void CopyTo(DataValue* array[],System::Int32 startAt); 00244 00245 /// \brief 00246 /// Gets the item in the collection at the specified index. 00247 /// 00248 /// \param index 00249 /// The index of the item in the collection. The index is 0 based. 00250 /// 00251 /// \return 00252 /// Returns an instance of a the collected item. 00253 /// Throws an instance of Exception if the index is out of range or an error occurs. 00254 /// 00255 __property DataValue* get_RealTypeItem(System::Int32 index); 00256 00257 /// \brief 00258 /// Sets the value of the item at the specified index 00259 /// 00260 /// \param index 00261 /// Input index of the item to set. 00262 /// 00263 /// \param value 00264 /// Input the value of the item 00265 /// 00266 __property System::Void set_RealTypeItem(System::Int32 index, DataValue* value); 00267 00268 /// \brief 00269 /// Gets an item in the collection. 00270 /// 00271 /// \param index 00272 /// Input index of the item to retrieve. 00273 /// 00274 /// \return 00275 /// Returns the item at the specified index 00276 /// 00277 __property DataValue* get_Item(System::Int32 index); 00278 00279 /// \brief 00280 /// Sets the value of the item at the specified index 00281 /// 00282 /// \param index 00283 /// Input index of the item to set. 00284 /// 00285 /// \param value 00286 /// Input the value of the item 00287 /// 00288 __property System::Void set_Item(System::Int32 index, DataValue* value); 00289 00290 /// \cond DOXYGEN-IGNORE 00291 protected: 00292 System::Void ReleaseUnmanagedObject(); 00293 /// \endcond 00294 }; 00295 00296 END_NAMESPACE_OSGEO_FDO_RASTER 00297 00298
Comments or suggestions? Send us feedback. |