FDO .NET API Reference Feature Data Objects

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

Comments or suggestions? Send us feedback.