FDO API Reference Feature Data Objects

SignatureDefinition.h

Go to the documentation of this file.
00001 #ifndef _SIGNATUREDEFINITION_H_
00002 #define _SIGNATUREDEFINITION_H_
00003 // 
00004 
00005 //
00006 // Copyright (C) 2004-2006  Autodesk, Inc.
00007 // 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of version 2.1 of the GNU Lesser
00010 // General Public License as published by the Free Software Foundation.
00011 // 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 //
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif
00025 
00026 #include <FdoStd.h>
00027 #include <Fdo/IDisposableCollection.h>
00028 #include <Fdo/Schema/SchemaException.h>
00029 #include <Fdo/ReadOnlyUnnamedCollection.h>
00030 #include <Fdo/Connections/Capabilities/ReadOnlyArgumentDefinitionCollection.h>
00031 
00032 class FdoSignatureDefinition : public FdoIDisposable
00033 {
00034 public:
00035     /// \brief
00036     /// Constructs an instance of a SignatureDefinition using the specified arguments.
00037     FDO_API static FdoSignatureDefinition* Create (
00038                                                             FdoDataType                     returnType,
00039                                                             FdoArgumentDefinitionCollection *arguments);
00040 
00041     /// \brief
00042     /// Constructs an instance of a SignatureDefinition using the specified arguments.
00043     FDO_API static FdoSignatureDefinition* Create (
00044                                                             FdoPropertyType                 returnPropertyType,
00045                                                             FdoDataType                     returnType,
00046                                                             FdoArgumentDefinitionCollection *arguments);
00047 
00048     /// \brief
00049     /// Gets an array of FdoArgumentDefinition objects required for the function. 
00050     FDO_API FdoReadOnlyArgumentDefinitionCollection* GetArguments ();
00051 
00052     /// \brief
00053     /// Gets the FdoPropertyType of the function return value.
00054     FDO_API FdoPropertyType GetReturnPropertyType ();
00055 
00056     /// \brief
00057     /// Gets the FdoDataType of the function return value. This is only valid if the function return property type is
00058     /// FdoPropertyType_DataProperty.
00059     FDO_API FdoDataType GetReturnType ();
00060 
00061 
00062 /// \cond DOXYGEN-IGNORE
00063 protected:
00064     /// Constructs an instance of a SignatureDefinition using the specified arguments.
00065     FdoSignatureDefinition (FdoDataType                     returnType,
00066                             FdoArgumentDefinitionCollection *arguments);
00067 
00068     /// Constructs an instance of a SignatureDefinition using the specified arguments.
00069     FdoSignatureDefinition (FdoPropertyType                 returnPropertyType,
00070                             FdoDataType                     returnType,
00071                             FdoArgumentDefinitionCollection *arguments);
00072 
00073     /// Constructs an instance of an SignatureDefinition with default properties.
00074     FdoSignatureDefinition();
00075 
00076     virtual ~FdoSignatureDefinition();
00077 
00078     virtual void Dispose();
00079 /// \endcond
00080 private:
00081 
00082     FdoDataType                             m_returnDataType;
00083     FdoPropertyType                         m_returnPropertyType;
00084     FdoReadOnlyArgumentDefinitionCollection *m_arguments;
00085 
00086 };
00087 
00088 // -----------------------------------------------------------------------------------------------------
00089 
00090 /// \brief
00091 /// The FdoSignatureDefinitionCollection class represents a collection of FdoSignatureDefinition objects.
00092 class FdoSignatureDefinitionCollection : public FdoCollection<FdoSignatureDefinition, FdoConnectionException>
00093 {
00094 protected:
00095     virtual void Dispose()
00096     {
00097         delete this;
00098     }
00099 
00100 public:
00101     /// \brief
00102     /// Constructs a default empty instance of an FdoSignatureDefinitionCollection.
00103     /// 
00104     /// \return
00105     /// Returns FdoSignatureDefinitionCollection
00106     /// 
00107     FDO_API static FdoSignatureDefinitionCollection *Create();
00108 
00109     /// \brief
00110     /// Constructs an FdoArgumentDefinitionCollection from an array of FdoArgumentDefinition objects.
00111     /// 
00112     /// \param arguments 
00113     /// Input an array of FdoArgumentDefinition objects
00114     /// \param length 
00115     /// Input the number of arguments
00116     /// 
00117     /// \return
00118     /// Returns FdoArgumentDefinitionCollection
00119     /// 
00120     FDO_API static FdoSignatureDefinitionCollection *Create(FdoSignatureDefinition** arguments, FdoInt32 length);
00121 
00122 };
00123 
00124 // -----------------------------------------------------------------------------------------------------
00125 
00126 class FdoReadOnlySignatureDefinitionCollection : public FdoReadOnlyUnnamedCollection<FdoSignatureDefinition, 
00127                                                                                      FdoSignatureDefinitionCollection, 
00128                                                                                      FdoSchemaException>
00129 {
00130 /// \cond DOXYGEN-IGNORE
00131 protected:
00132     /// Constructs an instance of a SignatureDefinition using the specified arguments.
00133     FdoReadOnlySignatureDefinitionCollection ();
00134 
00135     virtual ~FdoReadOnlySignatureDefinitionCollection();
00136 
00137     virtual void Dispose()
00138     {
00139         delete this;
00140     }
00141 /// \endcond
00142 
00143 public:
00144     /// \brief
00145     /// Constructs an instance of an FdoReadOnlySignatureDefinitionCollection by providing a non-readonly collection.
00146     /// 
00147     /// \param col 
00148     /// Input a signature collection
00149     /// 
00150     /// \return
00151     /// Returns FdoReadOnlySignatureDefinitionCollection
00152     /// 
00153     FDO_API static FdoReadOnlySignatureDefinitionCollection* Create(FdoSignatureDefinitionCollection *col);
00154 };
00155 
00156 #endif

Comments or suggestions? Send us feedback.