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 #include "FDO\Schema\mgDataType.h" 00022 #include "FDO\Schema\mgPropertyType.h" 00023 #include "FDO\Connections\Capabilities\mgArgumentDefinitionCollection.h" 00024 #include "FDO\Connections\Capabilities\mgReadOnlyArgDefColl.h" 00025 00026 class FdoSignatureDefinition; 00027 class FdoReadOnlySignatureDefinitionCollection; 00028 00029 using namespace NAMESPACE_OSGEO_FDO_SCHEMA; 00030 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES 00031 00032 /// \ingroup (OSGeoFDOConnectionsCapabilities) 00033 /// \brief 00034 /// The FDO SignatureDefinition class allows the signatures of FDO FunctionDefinition objects to be defined. 00035 public __gc class SignatureDefinition : public NAMESPACE_OSGEO_RUNTIME::Disposable 00036 { 00037 public: 00038 00039 /// \brief 00040 /// Constructs an instance of a FunctionDefinition using the specified arguments. 00041 SignatureDefinition (NAMESPACE_OSGEO_FDO_SCHEMA::DataType returnDataType, 00042 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinitionCollection *arguments); 00043 00044 /// \brief 00045 /// Constructs an instance of a FunctionDefinition using the specified arguments. 00046 SignatureDefinition (NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType returnPropertyType, 00047 NAMESPACE_OSGEO_FDO_SCHEMA::DataType returnDataType, 00048 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinitionCollection *arguments); 00049 00050 /// \brief 00051 /// Gets an array of ArgumentDefinition objects required for the function. 00052 __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ReadOnlyArgumentDefinitionCollection *get_Arguments(); 00053 00054 /// \brief 00055 /// Gets the PropertyType of the function return value. 00056 __property NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType get_ReturnPropertyType(); 00057 00058 /// \brief 00059 /// Gets the DataType of the function return value. This is only valid if the function return property type is 00060 /// PropertyType_DataProperty. 00061 __property NAMESPACE_OSGEO_FDO_SCHEMA::DataType get_ReturnType(); 00062 00063 /// \cond DOXYGEN-IGNORE 00064 protected: 00065 System::Void ReleaseUnmanagedObject(); 00066 /// \endcond 00067 00068 public private: 00069 SignatureDefinition(System::IntPtr unmanaged, System::Boolean autoDelete); 00070 00071 inline FdoSignatureDefinition* GetImpObj(); 00072 }; 00073 00074 // ----------------------------------------------------------------------------------------------------- 00075 00076 00077 /// \ingroup (OSGeoFDOConnectionsCapabilities) 00078 /// \brief 00079 /// SignatureDefinitionCollection is a collection of SignatureDefinition elements. 00080 /// 00081 [System::Reflection::DefaultMemberAttribute("RealTypeItem")] 00082 public __sealed __gc class SignatureDefinitionCollection : public NAMESPACE_OSGEO_RUNTIME::Disposable, public System::Collections::IList 00083 { 00084 /// \cond DOXYGEN-IGNORE 00085 private: 00086 /// \brief 00087 /// A Nested class defined to provide enumeration of Dictionary elements 00088 /// 00089 /// Enumerators can be used to read the data in the collection, 00090 /// but they cannot be used to modify the underlying collection. 00091 /// 00092 /// An enumerator remains valid as long as the collection remains unchanged. 00093 /// If changes are made to the collection, such as adding, modifying, or deleting 00094 /// elements, the enumerator is irrecoverably invalidated and the next call to 00095 /// MoveNext or Reset throws an InvalidOperationException. If the collection is 00096 /// modified between MoveNext and Current, Current returns the element that it is 00097 /// set to, even if the enumerator is already invalidated. 00098 /// 00099 /// The enumerator does not have exclusive access to the collection; therefore, 00100 /// enumerating through a collection is intrinsically not a thread-safe procedure. 00101 /// Even when a collection is synchronized, other threads can still modify the 00102 /// collection, which causes the enumerator to throw an exception. To guarantee 00103 /// thread safety during enumeration, you can either lock the collection during 00104 /// the entire enumeration or catch the exceptions resulting from changes made 00105 /// by other threads. 00106 /// 00107 __gc class Enumerator : public System::Collections::IEnumerator 00108 { 00109 private: 00110 SignatureDefinitionCollection *m_pCol; 00111 System::Int32 m_nIdx; 00112 00113 public: 00114 /// \brief 00115 /// Constructs a new Collection Enumerator 00116 /// 00117 /// \param col 00118 /// Input The collection to enumerate. 00119 /// 00120 Enumerator(SignatureDefinitionCollection* elements) : m_pCol(elements), m_nIdx(-1) 00121 { 00122 00123 } 00124 00125 /// \brief 00126 /// Retrieves the current object at the enumerator location 00127 /// 00128 /// \return 00129 /// Retuns the current object referenced by the enumerator 00130 /// 00131 __property System::Object *get_Current(); 00132 00133 /// \brief 00134 /// Initially, the enumerator is positioned before the first object in the collection. 00135 /// At this position, calling the Current property throws an exception. 00136 /// Therefore, you must call the MoveNext method to advance the enumerator 00137 /// to the first element of the collection before reading the value of Current. 00138 /// If MoveNext passes the end of the collection, the enumerator is positioned 00139 /// after the last element in the collection and MoveNext returns false. 00140 /// When the enumerator is at this position, subsequent calls to MoveNext also return false. 00141 /// If the last call to MoveNext returned false, calling Current throws an exception. 00142 /// To set Current to the first element of the collection again, you can call Reset 00143 /// followed by MoveNext. 00144 /// 00145 /// \return 00146 /// Retuns true if the Enumerator is able to move to a valid element 00147 /// otherwise false. 00148 /// 00149 System::Boolean MoveNext(); 00150 00151 /// \brief 00152 /// Initially, the enumerator is positioned before the first element in the collection. 00153 /// The Reset method brings the enumerator back to this position. 00154 /// 00155 System::Void Reset(); 00156 }; 00157 00158 public private: 00159 SignatureDefinitionCollection(System::IntPtr unmanaged, System::Boolean autoDelete); 00160 00161 inline FdoSignatureDefinitionCollection *GetImpObj(); 00162 00163 private: 00164 // System::Collections::ICollection interface properties 00165 __property System::Object* System::Collections::ICollection::get_SyncRoot(); 00166 __property System::Boolean System::Collections::ICollection::get_IsSynchronized(); 00167 00168 // System::Collections::ICollection interface methods 00169 System::Void System::Collections::ICollection::CopyTo(System::Array* array,System::Int32 index); 00170 00171 // System::Collections::IList interface properties 00172 __property System::Boolean System::Collections::IList::get_IsFixedSize(); 00173 __property System::Boolean System::Collections::IList::get_IsReadOnly(); 00174 __property Object* System::Collections::IList::get_Item(System::Int32 index); 00175 __property System::Void System::Collections::IList::set_Item(System::Int32 index, Object* value); 00176 00177 // System::Collections::IList interface methods 00178 System::Int32 System::Collections::IList::Add(Object* value); 00179 System::Boolean System::Collections::IList::Contains(Object* value); 00180 System::Int32 System::Collections::IList::IndexOf(Object* value); 00181 System::Void System::Collections::IList::Insert(System::Int32 index, Object* value); 00182 System::Void System::Collections::IList::Remove(Object* value); 00183 /// \endcond 00184 00185 public: 00186 SignatureDefinitionCollection(); 00187 00188 /// \brief 00189 /// Gets the count of items in collection. 00190 /// 00191 /// \return 00192 /// Returns the number of items in the collection. 00193 /// 00194 __property System::Int32 get_Count(System::Void); 00195 00196 /// \brief 00197 /// Gets an enumerator that can iterate through a collection. 00198 /// 00199 /// \return 00200 /// Returns an enumerator on the dictionary. 00201 /// 00202 __sealed System::Collections::IEnumerator* GetEnumerator(System::Void); 00203 00204 /// \brief 00205 /// Removes the index-th SignatureDefinition from this collection. 00206 /// 00207 /// \param index 00208 /// Input index of the element to remove. 00209 /// 00210 System::Void RemoveAt(System::Int32 index); 00211 00212 /// \brief 00213 /// Removes all elements from the collection. 00214 /// 00215 System::Void Clear(); 00216 00217 /// \brief 00218 /// Adds a SignatureDefinition object into the collection. 00219 /// 00220 /// \param value 00221 /// Input the SignatureDefinition object to add. 00222 /// 00223 /// \return 00224 /// Returns the position into which the new element was inserted. 00225 /// 00226 System::Int32 Add(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00227 00228 /// \brief 00229 /// Determines the index of a specific SignatureDefinition object. 00230 /// 00231 /// \param value 00232 /// Input the SignatureDefinition object to locate in the collection. 00233 /// 00234 /// \return 00235 /// The index of value if found in the collection; otherwise, -1. 00236 /// 00237 System::Int32 IndexOf(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00238 00239 /// \brief 00240 /// Inserts a SignatureDefinition object into the collection at the specified position. 00241 /// 00242 /// \param index 00243 /// Input the zero-based index at which value should be inserted. 00244 /// \param value 00245 /// Input the SignatureDefinition object to insert. 00246 /// 00247 System::Void Insert(System::Int32 index, NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00248 00249 /// \brief 00250 /// Removes the first occurrence of a specific SignatureDefinition object. 00251 /// 00252 /// \param value 00253 /// Input the SignatureDefinition object to remove from the collection. 00254 /// 00255 System::Void Remove(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00256 00257 /// \brief 00258 /// Determines whether the collection contains a specific SignatureDefinition object. 00259 /// 00260 /// \param value 00261 /// Input The SignatureDefinition object to search in the collection. 00262 /// 00263 /// \return 00264 /// Returns true if the value is found in the collection; otherwise, false. 00265 /// 00266 System::Boolean Contains(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00267 00268 /// \brief 00269 /// Copies the elements of the collection to an array. 00270 /// 00271 /// \param array 00272 /// Output the one-dimensional Array that is the destination of the elements copied from this collection. 00273 /// 00274 /// \param startAt 00275 /// Input an integer that represents the index in array at which copying begins. 00276 /// 00277 System::Void CopyTo(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *array[], System::Int32 startAt); 00278 00279 /// \brief 00280 /// Gets the item in the collection at the specified index. 00281 /// 00282 /// \param index 00283 /// The index of the item in the collection. The index is 0 based. 00284 /// 00285 /// \return 00286 /// Returns an instance of a the collected item. 00287 /// Throws an instance of Exception if the index is out of range or an error occurs. 00288 /// 00289 __property SignatureDefinition *get_RealTypeItem(System::Int32 index); 00290 00291 /// \brief 00292 /// Sets the value of the item at the specified index 00293 /// 00294 /// \param index 00295 /// Input index of the item to set. 00296 /// 00297 /// \param value 00298 /// Input the value of the item 00299 /// 00300 __property System::Void set_RealTypeItem(System::Int32 index, NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00301 00302 /// \brief 00303 /// Gets an item in the collection. 00304 /// 00305 /// \param index 00306 /// Input index of the item to retrieve. 00307 /// 00308 /// \return 00309 /// Returns the item at the specified index 00310 /// 00311 __property SignatureDefinition *get_Item(System::Int32 index); 00312 00313 /// \brief 00314 /// Sets the value of the item at the specified index 00315 /// 00316 /// \param index 00317 /// Input index of the item to set. 00318 /// 00319 /// \param value 00320 /// Input the value of the item 00321 /// 00322 __property System::Void set_Item(System::Int32 index, NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00323 00324 /// \cond DOXYGEN-IGNORE 00325 protected: 00326 System::Void ReleaseUnmanagedObject(); 00327 /// \endcond 00328 }; 00329 00330 // ----------------------------------------------------------------------------------------------------- 00331 00332 /// \ingroup (OSGeoFDOConnectionsCapbilities) 00333 /// \brief 00334 /// The ReadOnlySignatureDefinitionCollection class represents a collection of ReadOnlySignatureDefinition objects. 00335 [System::Reflection::DefaultMemberAttribute("RealTypeItem")] 00336 public __sealed __gc class ReadOnlySignatureDefinitionCollection : public NAMESPACE_OSGEO_RUNTIME::Disposable, 00337 public System::Collections::ICollection, 00338 public System::Collections::IEnumerable 00339 { 00340 /// \cond DOXYGEN-IGNORE 00341 private: 00342 /// \brief 00343 /// A Nested class defined to provide enumeration of Dictionary elements 00344 /// 00345 /// Enumerators can be used to read the data in the collection, 00346 /// but they cannot be used to modify the underlying collection. 00347 /// 00348 /// An enumerator remains valid as long as the collection remains unchanged. 00349 /// If changes are made to the collection, such as adding, modifying, or deleting 00350 /// elements, the enumerator is irrecoverably invalidated and the next call to 00351 /// MoveNext or Reset throws an InvalidOperationException. If the collection is 00352 /// modified between MoveNext and Current, Current returns the element that it is 00353 /// set to, even if the enumerator is already invalidated. 00354 /// 00355 /// The enumerator does not have exclusive access to the collection; therefore, 00356 /// enumerating through a collection is intrinsically not a thread-safe procedure. 00357 /// Even when a collection is synchronized, other threads can still modify the 00358 /// collection, which causes the enumerator to throw an exception. To guarantee 00359 /// thread safety during enumeration, you can either lock the collection during 00360 /// the entire enumeration or catch the exceptions resulting from changes made 00361 /// by other threads. 00362 /// 00363 __gc class Enumerator : public System::Collections::IEnumerator 00364 { 00365 private: 00366 ReadOnlySignatureDefinitionCollection *m_pCol; 00367 System::Int32 m_nIdx; 00368 00369 public: 00370 /// \brief 00371 /// Constructs a new Collection Enumerator 00372 /// 00373 /// \param col 00374 /// Input The collection to enumerate. 00375 /// 00376 Enumerator(ReadOnlySignatureDefinitionCollection *elements) : m_pCol(elements), m_nIdx(-1) 00377 { 00378 00379 } 00380 00381 /// \brief 00382 /// Retrieves the current object at the enumerator location 00383 /// 00384 /// \return 00385 /// Retuns the current object referenced by the enumerator 00386 /// 00387 __property System::Object *get_Current(); 00388 00389 /// \brief 00390 /// Initially, the enumerator is positioned before the first object in the collection. 00391 /// At this position, calling the Current property throws an exception. 00392 /// Therefore, you must call the MoveNext method to advance the enumerator 00393 /// to the first element of the collection before reading the value of Current. 00394 /// If MoveNext passes the end of the collection, the enumerator is positioned 00395 /// after the last element in the collection and MoveNext returns false. 00396 /// When the enumerator is at this position, subsequent calls to MoveNext also return false. 00397 /// If the last call to MoveNext returned false, calling Current throws an exception. 00398 /// To set Current to the first element of the collection again, you can call Reset 00399 /// followed by MoveNext. 00400 /// 00401 /// \return 00402 /// Retuns true if the Enumerator is able to move to a valid element 00403 /// otherwise false. 00404 /// 00405 System::Boolean MoveNext(); 00406 00407 /// \brief 00408 /// Initially, the enumerator is positioned before the first element in the collection. 00409 /// The Reset method brings the enumerator back to this position. 00410 /// 00411 System::Void Reset(); 00412 }; 00413 00414 public private: 00415 ReadOnlySignatureDefinitionCollection(System::IntPtr unmanaged, System::Boolean autoDelete); 00416 00417 inline FdoReadOnlySignatureDefinitionCollection *GetImpObj(); 00418 00419 private: 00420 // System::Collections::ICollection methods 00421 System::Void System::Collections::ICollection::CopyTo(System::Array *array, System::Int32 index); 00422 00423 // System::Collections::ICollection properties 00424 __property System::Object *System::Collections::ICollection::get_SyncRoot(); 00425 __property System::Boolean System::Collections::ICollection::get_IsSynchronized(); 00426 00427 /// \endcond 00428 00429 public: 00430 ReadOnlySignatureDefinitionCollection(); 00431 00432 /// \brief 00433 /// Gets the count of items in collection. 00434 /// 00435 /// \return 00436 /// Returns the number of items in the collection. 00437 /// 00438 __property System::Int32 get_Count(System::Void); 00439 00440 /// \brief 00441 /// Gets an enumerator that can iterate through a collection. 00442 /// 00443 /// \return 00444 /// Returns an enumerator on the dictionary. 00445 /// 00446 __sealed System::Collections::IEnumerator* GetEnumerator(System::Void); 00447 00448 /// \brief 00449 /// Copies the elements of the collection to an array. 00450 /// 00451 /// \param array 00452 /// Output the one-dimensional Array that is the destination of the elements copied from this collection. 00453 /// 00454 /// \param startAt 00455 /// Input an integer that represents the index in array at which copying begins. 00456 /// 00457 System::Void CopyTo(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *array[], System::Int32 startAt); 00458 00459 /// \brief 00460 /// Determines the index of a specific SignatureDefinition object. 00461 /// 00462 /// \param value 00463 /// Input the SignatureDefinition object to locate in the collection. 00464 /// 00465 /// \return 00466 /// The index of value if found in the collection; otherwise, -1. 00467 /// 00468 System::Int32 IndexOf(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00469 00470 /// \brief 00471 /// Determines whether the collection contains a specific SignatureDefinition object. 00472 /// 00473 /// \param value 00474 /// Input The SignatureDefinition object to search in the collection. 00475 /// 00476 /// \return 00477 /// Returns true if the value is found in the collection; otherwise, false. 00478 /// 00479 System::Boolean Contains(NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinition *value); 00480 00481 /// \brief 00482 /// Gets the item in the collection at the specified index. 00483 /// 00484 /// \param index 00485 /// The index of the item in the collection. The index is 0 based. 00486 /// 00487 /// \return 00488 /// Returns an instance of a the collected item. 00489 /// Throws an instance of Exception if the index is out of range or an error occurs. 00490 /// 00491 __property SignatureDefinition *get_RealTypeItem(System::Int32 index); 00492 00493 /// \brief 00494 /// Gets the item in the collection at the specified index. 00495 /// 00496 /// \param name 00497 /// The name of the item in the collection. 00498 /// 00499 /// \return 00500 /// Returns an instance of a the collected item. 00501 /// 00502 __property SignatureDefinition *get_RealTypeItem(System::String* name); 00503 00504 /// \cond DOXYGEN-IGNORE 00505 protected: 00506 System::Void ReleaseUnmanagedObject(); 00507 /// \endcond 00508 }; 00509 00510 END_NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES 00511
Comments or suggestions? Send us feedback. |