FDO .NET API Reference Feature Data Objects

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

Comments or suggestions? Send us feedback.