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