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 FdoDataPropertyDefinitionCollection; 00022 00023 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA 00024 public __gc class DataPropertyDefinition; 00025 public __gc class SchemaElement; 00026 00027 /// \ingroup (OSGeoFDOSchema) 00028 /// \brief 00029 /// The DataPropertyDefinitionCollection class represents a collection of DataPropertyDefinition objects. 00030 [System::Reflection::DefaultMemberAttribute("RealTypeItem")] 00031 public __sealed __gc class DataPropertyDefinitionCollection : 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 DataPropertyDefinitionCollection* 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(DataPropertyDefinitionCollection* 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 FdoDataPropertyDefinitionCollection* 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 DataPropertyDefinitionCollection object 00138 /// 00139 /// \param parent 00140 /// Input A Pointer to the parent schema object of the collection 00141 /// 00142 DataPropertyDefinitionCollection(NAMESPACE_OSGEO_FDO_SCHEMA::SchemaElement* parent); 00143 00144 /// \brief 00145 /// Constructs a DataPropertyDefinitionCollection object based on an unmanaged instance of the object 00146 /// 00147 /// \param unmanaged 00148 /// Input A Pointer to the unmanaged object. 00149 /// 00150 /// \param autoDelete 00151 /// Input Indicates if the constructed object should be automatically deleted 00152 /// once it no longer referenced. 00153 /// 00154 DataPropertyDefinitionCollection(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_RUNTIME::Disposable(unmanaged, autoDelete) 00155 { 00156 00157 } 00158 00159 /// \brief 00160 /// Gets the count of items in collection. 00161 /// 00162 /// \return 00163 /// Returns the number of items in the collection. 00164 /// 00165 __property System::Int32 get_Count(System::Void); 00166 00167 /// \brief 00168 /// Gets an enumerator that can iterate through a collection. 00169 /// 00170 /// \return 00171 /// Returns an enumerator on the dictionary. 00172 /// 00173 __sealed System::Collections::IEnumerator* GetEnumerator(System::Void); 00174 00175 /// \brief 00176 /// Removes the index-th DataPropertyDefinition from this collection. 00177 /// 00178 /// \param index 00179 /// Input index of the element to remove. 00180 /// 00181 System::Void RemoveAt(System::Int32 index); 00182 00183 /// \brief 00184 /// Removes all elements from the collection. 00185 /// 00186 System::Void Clear(); 00187 00188 /// \brief 00189 /// Adds a DataPropertyDefinition object into the collection. 00190 /// 00191 /// \param value 00192 /// Input the DataPropertyDefinition object to add. 00193 /// 00194 /// \return 00195 /// Returns the position into which the new element was inserted. 00196 /// 00197 System::Int32 Add(DataPropertyDefinition* value); 00198 00199 /// \brief 00200 /// Determines the index of a specific DataPropertyDefinition object. 00201 /// 00202 /// \param value 00203 /// Input the DataPropertyDefinition object to locate in the collection. 00204 /// 00205 /// \return 00206 /// The index of value if found in the collection; otherwise, -1. 00207 /// 00208 System::Int32 IndexOf(DataPropertyDefinition* value); 00209 00210 System::Int32 IndexOf(String* name); 00211 00212 /// \brief 00213 /// Inserts a DataPropertyDefinition object into the collection at the specified position. 00214 /// 00215 /// \param index 00216 /// Input the zero-based index at which value should be inserted. 00217 /// \param value 00218 /// Input the DataPropertyDefinition object to insert. 00219 /// 00220 System::Void Insert(System::Int32 index, DataPropertyDefinition* value); 00221 00222 /// \brief 00223 /// Removes the first occurrence of a specific DataPropertyDefinition object. 00224 /// 00225 /// \param value 00226 /// Input the DataPropertyDefinition object to remove from the collection. 00227 /// 00228 System::Void Remove(DataPropertyDefinition* value); 00229 00230 /// \brief 00231 /// Determines whether the collection contains a specific DataPropertyDefinition object. 00232 /// 00233 /// \param value 00234 /// Input The DataPropertyDefinition object to search in the collection. 00235 /// 00236 /// \return 00237 /// Returns true if the value is found in the collection; otherwise, false. 00238 /// 00239 System::Boolean Contains(DataPropertyDefinition* value); 00240 00241 /// \brief 00242 /// Determines whether the collection contains a specific DataPropertyDefinition object. 00243 /// 00244 /// \param name 00245 /// Input The name of the DataPropertyDefinition object to search in the collection. 00246 /// 00247 /// \return 00248 /// Returns true if the value is found in the collection; otherwise, false. 00249 /// 00250 System::Boolean Contains(String* name); 00251 00252 /// \brief 00253 /// Copies the elements of the collection to an array. 00254 /// 00255 /// \param array 00256 /// Output the one-dimensional Array that is the destination of the elements copied from this collection. 00257 /// \param startAt 00258 /// Input an integer that represents the index in array at which copying begins. 00259 /// 00260 System::Void CopyTo(DataPropertyDefinition* array[],System::Int32 startAt); 00261 00262 /// \brief 00263 /// Gets the item in the collection at the specified index. 00264 /// 00265 /// \param index 00266 /// The index of the item in the collection. The index is 0 based. 00267 /// 00268 /// \return 00269 /// Returns an instance of a the collected item. 00270 /// Throws an instance of Exception if the index is out of range or an error occurs. 00271 /// 00272 __property DataPropertyDefinition* get_RealTypeItem(System::Int32 index); 00273 00274 /// \brief 00275 /// Gets the item in the collection by name. 00276 /// 00277 /// \param index 00278 /// The name of the item in the collection. 00279 /// 00280 /// \return 00281 /// Returns an instance of a the collected item. 00282 /// 00283 __property DataPropertyDefinition* get_RealTypeItem(System::String* index); 00284 00285 /// \brief 00286 /// Sets the value of the item at the specified index 00287 /// 00288 /// \param index 00289 /// Input index of the item to set. 00290 /// 00291 /// \param value 00292 /// Input the value of the item 00293 /// 00294 __property System::Void set_RealTypeItem(System::Int32 index, DataPropertyDefinition* value); 00295 00296 /// \brief 00297 /// Gets an item in the collection. 00298 /// 00299 /// \param index 00300 /// Input index of the item to retrieve. 00301 /// 00302 /// \return 00303 /// Returns the item at the specified index 00304 /// 00305 __property DataPropertyDefinition* get_Item(System::Int32 index); 00306 00307 /// \brief 00308 /// Sets the value of the item at the specified index 00309 /// 00310 /// \param index 00311 /// Input index of the item to set. 00312 /// 00313 /// \param value 00314 /// Input the value of the item 00315 /// 00316 __property System::Void set_Item(System::Int32 index, DataPropertyDefinition* value); 00317 }; 00318 00319 END_NAMESPACE_OSGEO_FDO_SCHEMA 00320 00321
Comments or suggestions? Send us feedback. |