FDO .NET API Reference Feature Data Objects

mgClassCapabilities.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 #include "FDO\Commands\Locking\mgLockType.h"
00022 
00023 class FdoClassCapabilities;
00024 
00025 template <typename T>
00026 class FdoArray;
00027 
00028 enum FdoLockType;
00029 
00030 BEGIN_NAMESPACE_OSGEO_FDO_SCHEMA
00031 public __gc class ClassDefinition;
00032 
00033 /// \ingroup (OSGeoFDOSchema)
00034 /// \brief
00035 /// The ClassCapabilites class describes various capabilities
00036 /// for a particular FDO Class Definition and an FDO Provider datastore.
00037 public __gc class ClassCapabilities : public NAMESPACE_OSGEO_RUNTIME::Disposable
00038 {
00039 public:
00040     /// \brief
00041     /// Constructs an ClassCapabilities instance. This function
00042     /// should only be called from an FDO Provider.
00043     /// 
00044     /// \param parent 
00045     /// Input The FDO Class Definition that owns these capabilities.
00046     /// 
00047     ClassCapabilities(NAMESPACE_OSGEO_FDO_SCHEMA::ClassDefinition* parent);
00048 
00049     /// \brief
00050     /// Gets the locking support capability.
00051     /// 
00052     /// \return
00053     /// Returns true if objects of this class can be locked
00054     /// 
00055     __property System::Boolean get_SupportsLocking();
00056 
00057     /// \brief
00058     /// Sets the locking support capability. This function should only 
00059     /// be called from an FDO Provider.
00060     /// 
00061     /// \param value 
00062     /// Input The locking support capability
00063     /// 
00064     __property System::Void set_SupportsLocking(System::Boolean value);
00065 
00066     /// \brief
00067     /// Gets an array of LockType values supported by the feature provider.
00068     /// 
00069     /// \return
00070     /// Returns the list of lock types
00071     /// 
00072     __property NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType get_LockTypes() [];
00073 
00074     /// \brief
00075     /// Sets the locking types support capability. This function should only 
00076     /// be called from an FDO Provider.
00077     /// 
00078     /// \param types 
00079     /// The supported array of lock types
00080     /// 
00081     __property System::Void set_LockTypes(NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType types[]);
00082 
00083     /// \brief
00084     /// Gets the long transaction support capability.
00085     /// 
00086     /// \return
00087     /// Returns true if long transactions can be created on objects
00088     /// of this class
00089     /// 
00090     __property System::Boolean get_SupportsLongTransactions();
00091 
00092     /// \brief
00093     /// Sets the long transaction support capability. This function should
00094     /// only be called from an FDO Provider.
00095     /// 
00096     /// \param value 
00097     /// Input The long transaction capability
00098     /// 
00099     __property System::Void set_SupportsLongTransactions(System::Boolean value );
00100 
00101     /// \brief
00102     /// Gets the parent of this Class Capabilites object.
00103     /// 
00104     /// \return
00105     /// Returns ClassDefinition
00106     /// 
00107     __property NAMESPACE_OSGEO_FDO_SCHEMA::ClassDefinition* get_Parent();
00108 
00109     /// \brief
00110     /// Returns true if the class supports write.
00111     /// 
00112     __property System::Boolean get_SupportsWrite();
00113 
00114 public private:
00115     ClassCapabilities(System::IntPtr unmanaged, System::Boolean autoDelete);
00116 
00117     inline FdoClassCapabilities* GetImpObj();
00118 
00119 /// \cond DOXYGEN-IGNORE
00120 protected:
00121     System::Void ReleaseUnmanagedObject();
00122 /// \endcond
00123 
00124 private:
00125     typedef FdoArray<FdoLockType> FdoLockTypeArray;
00126 
00127     inline NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType WrapFdoLockTypeArray(const FdoLockType* umArray, FdoInt32 len) []
00128     {
00129         NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType mgArray __gc[] = __gc new NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType[len];
00130         for (FdoInt32 i = 0; i < len; i++)
00131         {
00132             mgArray[i] = static_cast<NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType>(umArray[i]);
00133         }
00134         return mgArray;
00135     }
00136 
00137     inline FdoLockTypeArray* UnwrapLockTypeArray(NAMESPACE_OSGEO_FDO_COMMANDS_LOCKING::LockType mgArray __gc[])
00138     {
00139         FdoLockType* umArray = new FdoLockType[mgArray->Length];
00140         for (FdoInt32 i = 0; i < mgArray->Length; i++)
00141         {
00142             umArray[i] = static_cast<FdoLockType>(mgArray[i]);
00143         }
00144         return FdoLockTypeArray::Create(umArray, mgArray->Length);
00145     }
00146 
00147 };
00148 
00149 END_NAMESPACE_OSGEO_FDO_SCHEMA
00150 
00151 

Comments or suggestions? Send us feedback.