FDO .NET API Reference Feature Data Objects

mgReadOnlyDataPropertyDefinitionCollection.h

Go to the documentation of this file.
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 FdoReadOnlyDataPropertyDefinitionCollection;
00022 
00023 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA
00024 public __gc class DataPropertyDefinition;
00025 public __gc class DataPropertyDefinitionCollection;
00026 
00027 /// \ingroup (OSGeoFDOSchema)
00028 /// \brief
00029 /// The ReadOnlyDataPropertyDefinitionCollection class represents a collection of DataPropertyDefinition objects.
00030 [System::Reflection::DefaultMemberAttribute("RealTypeItem")]
00031 public __sealed __gc class ReadOnlyDataPropertyDefinitionCollection : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::ICollection, public System::Collections::IEnumerable
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         ReadOnlyDataPropertyDefinitionCollection* 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(ReadOnlyDataPropertyDefinitionCollection* 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 private:
00108     inline FdoReadOnlyDataPropertyDefinitionCollection* GetImpObj();
00109 
00110 private:
00111     // System::Collections::ICollection interfaces
00112     System::Void System::Collections::ICollection::CopyTo(System::Array* array,System::Int32 index);
00113 
00114     __property System::Object* System::Collections::ICollection::get_SyncRoot();
00115 
00116     __property System::Boolean System::Collections::ICollection::get_IsSynchronized();
00117 
00118 protected:
00119     System::Void ReleaseUnmanagedObject();
00120 /// \endcond
00121 
00122 public:
00123     /// \brief
00124     /// Constructs a ReadOnlyDataPropertyDefinitionCollection object
00125     /// 
00126     /// \param parent 
00127     /// Input A Pointer to the parent schema object of the collection
00128     /// 
00129     ReadOnlyDataPropertyDefinitionCollection(NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinitionCollection* parent);
00130 
00131     /// \brief
00132     /// Constructs a ReadOnlyDataPropertyDefinitionCollection object based on an unmanaged instance of the object
00133     /// 
00134     /// \param unmanaged 
00135     /// Input A Pointer to the unmanaged object.
00136     /// 
00137     /// \param autoDelete 
00138     /// Input Indicates if the constructed object should be automatically deleted 
00139     /// once it no longer referenced.
00140     /// 
00141     ReadOnlyDataPropertyDefinitionCollection(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_RUNTIME::Disposable(unmanaged, autoDelete)
00142     {
00143 
00144     }
00145 
00146     /// \brief
00147     /// Gets the count of items in collection.
00148     /// 
00149     /// \return
00150     /// Returns the number of items in the collection.
00151     /// 
00152     __property System::Int32 get_Count(System::Void);
00153 
00154     /// \brief
00155     /// Gets an enumerator that can iterate through a collection.
00156     /// 
00157     /// \return
00158     /// Returns an enumerator on the dictionary.
00159     /// 
00160     __sealed System::Collections::IEnumerator* GetEnumerator(System::Void);
00161 
00162     /// \brief
00163     /// Determines the index of a specific DataPropertyDefinition object.
00164     /// 
00165     /// \param value 
00166     /// Input the DataPropertyDefinition object to locate in the collection.
00167     /// 
00168     /// \return
00169     /// The index of value if found in the collection; otherwise, -1.
00170     /// 
00171     System::Int32 IndexOf(NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinition* value);
00172 
00173     /// \brief
00174     /// Determines whether the collection contains a specific DataPropertyDefinition object.
00175     /// 
00176     /// \param value 
00177     /// Input The DataPropertyDefinition object to search in the collection.
00178     /// 
00179     /// \return
00180     /// Returns true if the value is found in the collection; otherwise, false.
00181     /// 
00182     System::Boolean Contains(NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinition* value);
00183 
00184     /// \brief
00185     /// Copies the elements of the collection to an array.
00186     /// 
00187     /// \param array 
00188     /// Output the one-dimensional Array that is the destination of the elements copied from this collection.
00189     /// \param startAt 
00190     /// Input an integer that represents the index in array at which copying begins.
00191     /// 
00192     System::Void CopyTo(NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinition* array[],System::Int32 startAt);
00193 
00194     /// \brief
00195     /// Gets the item in the collection at the specified index. 
00196     /// 
00197     /// \param index 
00198     /// The index of the item in the collection. The index is 0 based.
00199     /// 
00200     /// \return
00201     /// Returns an instance of a the collected item.
00202     /// Throws an instance of Exception if the index is out of range or an error occurs.
00203     /// 
00204     __property NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinition* get_RealTypeItem(System::Int32 index);
00205 
00206     /// \brief
00207     /// Gets the DataPropertyDefinition item in the collection at the specified index. 
00208     /// 
00209     /// \param name 
00210     /// The name of the DataPropertyDefinition item in the collection.
00211     /// 
00212     /// \return
00213     /// Returns an instance of a the collected item.
00214     /// Throws an instance of Exception if the index is out of range or an error occurs.
00215     /// 
00216     __property NAMESPACE_OSGEO_FDO_SCHEMA::DataPropertyDefinition* get_RealTypeItem(System::String* name);
00217 };
00218 
00219 END_NAMESPACE_OSGEO_FDO_SCHEMA
00220 
00221 

Comments or suggestions? Send us feedback.