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