FDO API Reference Feature Data Objects

ClassCapabilities.h

Go to the documentation of this file.
00001 #ifndef _CLASSCAPABILITIES_H_
00002 #define _CLASSCAPABILITIES_H_
00003 
00004 //
00005 // Copyright (C) 2004-2006  Autodesk, Inc.
00006 // 
00007 // This library is free software; you can redistribute it and/or
00008 // modify it under the terms of version 2.1 of the GNU Lesser
00009 // General Public License as published by the Free Software Foundation.
00010 // 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 // 
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 
00021 #ifdef _WIN32
00022 #pragma once
00023 #endif
00024 
00025 #include <FdoStd.h>
00026 #include <Fdo/Schema/SchemaElement.h>
00027 #include <Fdo/Commands/Locking/LockType.h>
00028 
00029 class FdoClassDefinition;
00030 
00031 /// \brief
00032 /// The FdoClassCapabilites class describes various capabilities
00033 /// for a particular FDO Class Definition and an FDO Provider datastore.
00034 class FdoClassCapabilities : 
00035     public FdoIDisposable
00036 {
00037 protected:
00038 /// \cond DOXYGEN-IGNORE
00039     FdoClassCapabilities();
00040 
00041     FdoClassCapabilities(FdoClassDefinition& parent);
00042 
00043     virtual ~FdoClassCapabilities();
00044 
00045     virtual void Dispose();
00046 /// \endcond
00047 
00048 public:
00049     /// \brief
00050     /// Gets the locking support capability.
00051     /// 
00052     /// \return
00053     /// Returns true if objects of this class can be locked
00054     /// 
00055     FDO_API FdoBoolean SupportsLocking();
00056 
00057     /// \brief
00058     /// Gets an array of the FdoLockType values supported by the feature provider.
00059     /// 
00060     /// \param size 
00061     /// Output the number of lock types
00062     /// 
00063     /// \return
00064     /// Returns the list of lock types
00065     /// 
00066     FDO_API FdoLockType* GetLockTypes(FdoInt32& size);
00067 
00068     /// \brief
00069     /// Gets the long transaction support capability.
00070     /// 
00071     /// \return
00072     /// Returns true if long transactions can be created on objects
00073     /// of this class
00074     /// 
00075     FDO_API FdoBoolean SupportsLongTransactions();
00076 
00077     /// \brief
00078     /// Gets the parent of this Class Capabilites object.
00079     /// 
00080     /// \return
00081     /// Returns FdoClassDefinition
00082     /// 
00083     FDO_API FdoClassDefinition* GetParent();
00084 
00085     /// \brief
00086     /// Constructs an FdoClassCapabilities instance. This function
00087     /// should only be called from an FDO Provider.
00088     /// 
00089     /// \param parent 
00090     /// Input The Fdo Class Definition that owns these
00091     /// capabilities.
00092     /// 
00093     /// \return
00094     /// Returns FdoClassCapabilities
00095     /// 
00096     FDO_API static FdoClassCapabilities* Create(FdoClassDefinition& parent);
00097 
00098     /// \brief
00099     /// Sets the locking support capability.
00100     /// 
00101     /// \param value 
00102     /// Input The locking support capability
00103     /// 
00104     FDO_API void SetSupportsLocking( FdoBoolean value);
00105 
00106     /// \brief
00107     /// Sets the locking types support capability. This function should only 
00108     /// be called from an FDO Provider.
00109     /// 
00110     /// \param types 
00111     /// The supported array of lock types
00112     /// \param size 
00113     /// The number of lock types
00114     /// 
00115     FDO_API void SetLockTypes(const FdoLockType* types, FdoInt32 size);
00116 
00117     /// \brief
00118     /// Sets the long transaction support capability.
00119     /// 
00120     /// \param value 
00121     /// Input The long transaction capability
00122     /// 
00123     FDO_API void SetSupportsLongTransactions( FdoBoolean value );
00124 
00125 private:
00126     FdoBoolean          m_supportsLocking;
00127     FdoBoolean          m_supportsLongTransactions;
00128     FdoClassDefinition* m_parent;
00129     FdoLockType*        m_lockTypes;
00130     FdoInt32            m_lockTypeCount;
00131 };
00132 
00133 /// \brief
00134 /// FdoClassCapabilitiesP is a FdoPtr on FdoClassCapabilities, provided for convenience.
00135 typedef FdoPtr<FdoClassCapabilities> FdoClassCapabilitiesP;
00136 
00137 #endif
00138 
00139 

Comments or suggestions? Send us feedback.