FDO .NET API Reference Feature Data Objects

mgDataValueCollection.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 FdoDataValueCollection;
00022 
00023 BEGIN_NAMESPACE_OSGEO_FDO_EXPRESSION
00024 public __gc class DataValue;
00025 
00026 /// \ingroup (OSGeoFDOExpression)
00027 /// \brief
00028 /// DataValueCollection is a collection of DataValue objects.
00029 [System::Reflection::DefaultMemberAttribute("RealTypeItem")]
00030 public __sealed __gc class DataValueCollection : 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         DataValueCollection* 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(DataValueCollection* 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     inline FdoDataValueCollection* GetImpObj();
00108 
00109 private:
00110     // System::Collections::ICollection interface properties
00111     __property System::Object* System::Collections::ICollection::get_SyncRoot();
00112     __property System::Boolean System::Collections::ICollection::get_IsSynchronized();
00113 
00114     // System::Collections::ICollection interface methods
00115     System::Void System::Collections::ICollection::CopyTo(System::Array* array,System::Int32 index);
00116 
00117     // System::Collections::IList interface properties
00118     __property System::Boolean System::Collections::IList::get_IsFixedSize();
00119     __property System::Boolean System::Collections::IList::get_IsReadOnly();
00120     __property Object* System::Collections::IList::get_Item(System::Int32 index);
00121     __property System::Void  System::Collections::IList::set_Item(System::Int32 index, Object* value);
00122 
00123     // System::Collections::IList interface methods
00124     System::Int32 System::Collections::IList::Add(Object* value);
00125     System::Boolean System::Collections::IList::Contains(Object* value);
00126     System::Int32 System::Collections::IList::IndexOf(Object* value);
00127     System::Void System::Collections::IList::Insert(System::Int32 index, Object* value);
00128     System::Void System::Collections::IList::Remove(Object* value);
00129 /// \endcond
00130 
00131 public:
00132     /// \brief
00133     /// The defaut constructor for the object
00134     /// 
00135     DataValueCollection();
00136 
00137     /// \brief
00138     /// Constructs a DataValueCollection object based on an unmanaged instance of the object
00139     /// 
00140     /// \param unmanaged 
00141     /// Input A Pointer to the unmanaged object.
00142     /// 
00143     /// \param autoDelete 
00144     /// Input Indicates if the constructed object should be automatically deleted 
00145     /// once it no longer referenced.
00146     /// 
00147     DataValueCollection(System::IntPtr unmanaged, System::Boolean autoDelete);
00148 
00149     /// \brief
00150     /// Gets the count of items in collection.
00151     /// 
00152     /// \return
00153     /// Returns the number of items in the collection.
00154     /// 
00155     __property System::Int32 get_Count(System::Void);
00156 
00157     /// \brief
00158     /// Gets an enumerator that can iterate through a collection.
00159     /// 
00160     /// \return
00161     /// Returns an enumerator on the dictionary.
00162     /// 
00163     __sealed System::Collections::IEnumerator* GetEnumerator(System::Void);
00164 
00165     /// \brief
00166     /// Removes the index-th ArgumentDefinition from this collection.
00167     /// 
00168     /// \param index 
00169     /// Input index of the element to remove.
00170     /// 
00171     System::Void RemoveAt(System::Int32 index);
00172 
00173     /// \brief
00174     /// Removes all elements from the collection.
00175     /// 
00176     System::Void  Clear();
00177 
00178     /// \brief
00179     /// Adds a ArgumentDefinition object into the collection.
00180     /// 
00181     /// \param value 
00182     /// Input the ArgumentDefinition object to add.
00183     /// 
00184     /// \return
00185     /// Returns the position into which the new element was inserted.
00186     /// 
00187     System::Int32 Add(DataValue* value);
00188 
00189     /// \brief
00190     /// Determines the index of a specific ArgumentDefinition object.
00191     /// 
00192     /// \param value 
00193     /// Input the ArgumentDefinition object to locate in the collection.
00194     /// 
00195     /// \return
00196     /// The index of value if found in the collection; otherwise, -1.
00197     /// 
00198     System::Int32 IndexOf(NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* value);
00199 
00200     /// \brief
00201     /// Inserts a ArgumentDefinition object into the collection at the specified position.
00202     /// 
00203     /// \param index 
00204     /// Input the zero-based index at which value should be inserted.
00205     /// \param value 
00206     /// Input the ArgumentDefinition object to insert.
00207     /// 
00208     System::Void Insert(System::Int32 index, NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* value);
00209 
00210     /// \brief
00211     /// Removes the first occurrence of a specific ArgumentDefinition object.
00212     /// 
00213     /// \param value 
00214     /// Input the ArgumentDefinition object to remove from the collection.
00215     /// 
00216     System::Void Remove(NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* value);
00217 
00218     /// \brief
00219     /// Determines whether the collection contains a specific ArgumentDefinition object.
00220     /// 
00221     /// \param value 
00222     /// Input The ArgumentDefinition 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(NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* 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(NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* 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 NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* 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, NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* 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 NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* 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, NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* value);
00284 
00285 /// \cond DOXYGEN-IGNORE
00286 protected:
00287     System::Void ReleaseUnmanagedObject();
00288 /// \endcond
00289 };
00290 
00291 END_NAMESPACE_OSGEO_FDO_EXPRESSION
00292 
00293 

Comments or suggestions? Send us feedback.