FDO API Reference | Feature Data Objects |
00001 #ifndef _FUNCTIONDEFINITION_H_ 00002 #define _FUNCTIONDEFINITION_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/Schema/PropertyType.h> 00028 #include <Fdo/Connections/Capabilities/ArgumentDefinition.h> 00029 #include <Fdo/Connections/Capabilities/ReadOnlyArgumentDefinitionCollection.h> 00030 #include <Fdo/Connections/Capabilities/SignatureDefinition.h> 00031 00032 /// \brief 00033 /// The FdoFunctionDefinition class contains metadata that describes a function and its arguments. 00034 class FdoFunctionDefinition : public FdoIDisposable 00035 { 00036 /// \cond DOXYGEN-IGNORE 00037 protected: 00038 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00039 FdoFunctionDefinition (FdoString *name, 00040 FdoString *description, 00041 FdoDataType returnType, 00042 FdoArgumentDefinitionCollection *arguments); 00043 00044 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00045 FdoFunctionDefinition (FdoString *name, 00046 FdoString *description, 00047 FdoPropertyType returnPropertyType, 00048 FdoDataType returnType, 00049 FdoArgumentDefinitionCollection *arguments); 00050 00051 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00052 // FdoFunctionDefinition (FdoSignatureDefinitionCollection *signatures); 00053 FdoFunctionDefinition (FdoString *name, 00054 FdoString *description, 00055 bool isAggregate, 00056 FdoSignatureDefinitionCollection *signatures); 00057 00058 /// Constructs an instance of an FdoFunctionDefinition using default values. 00059 FdoFunctionDefinition(); 00060 00061 virtual ~FdoFunctionDefinition(); 00062 00063 virtual void Dispose(); 00064 /// \endcond 00065 00066 public: 00067 /// \brief 00068 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00069 /// 00070 /// \param name 00071 /// Input the name of the function. 00072 /// \param description 00073 /// Input a brief description. 00074 /// \param returnType 00075 /// Input the function return type 00076 /// \param arguments 00077 /// Input the argument definition list 00078 /// 00079 /// \return 00080 /// Returns FdoFunctionDefinition 00081 /// 00082 FDO_API static FdoFunctionDefinition *Create (FdoString *name, 00083 FdoString *description, 00084 FdoDataType returnType, 00085 FdoArgumentDefinitionCollection *arguments); 00086 00087 /// \brief 00088 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00089 /// 00090 /// \param name 00091 /// Input the name of the function. 00092 /// \param description 00093 /// Input a brief description. 00094 /// \param returnPropertyType 00095 /// Input the function return property type 00096 /// \param returnType 00097 /// Input the function return data type (ignore it property type is not data) 00098 /// \param arguments 00099 /// Input the argument definition list 00100 /// 00101 /// \return 00102 /// Returns FdoFunctionDefinition 00103 /// 00104 FDO_API static FdoFunctionDefinition *Create (FdoString *name, 00105 FdoString *description, 00106 FdoPropertyType returnPropertyType, 00107 FdoDataType returnType, 00108 FdoArgumentDefinitionCollection *arguments); 00109 00110 /// \brief 00111 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00112 /// 00113 /// \param name 00114 /// Input the name of the function. 00115 /// \param description 00116 /// Input a brief description. 00117 /// \param isAggregate 00118 /// Input a flag indicating whether or not this is an aggregate function. 00119 /// \param signatures 00120 /// Input the list of possible function signatures 00121 /// 00122 /// \return 00123 /// Returns FdoFunctionDefinition 00124 /// 00125 FDO_API static FdoFunctionDefinition *Create (FdoString *name, 00126 FdoString *description, 00127 bool isAggregate, 00128 FdoSignatureDefinitionCollection *signatures); 00129 00130 /// \brief 00131 /// Gets the name of the function. 00132 /// 00133 /// \return 00134 /// Returns the name of the function 00135 /// 00136 FDO_API FdoString *GetName(); 00137 /// \brief 00138 /// Gets a brief description of the function. 00139 /// 00140 /// \return 00141 /// Returns the description of the function 00142 /// 00143 FDO_API FdoString *GetDescription(); 00144 /// \brief 00145 /// Gets an array of FdoArgumentDefinition objects required for the function. 00146 /// 00147 /// \return 00148 /// Returns the list of argument definitions 00149 /// 00150 FDO_API FdoReadOnlyArgumentDefinitionCollection *GetArguments(); 00151 /// \brief 00152 /// Gets the FdoPropertyType of the function return value. 00153 /// 00154 /// \return 00155 /// Returns the function return property type 00156 /// 00157 FDO_API FdoPropertyType GetReturnPropertyType(); 00158 /// \brief 00159 /// Gets the FdoDataType of the function return value. 00160 /// This is only valid if the function return property type is FdoPropertyType_DataProperty. 00161 /// 00162 /// \return 00163 /// Returns the function return data type 00164 /// 00165 FDO_API FdoDataType GetReturnType(); 00166 /// \brief 00167 /// Indicates that this object allows its name 00168 /// to change. This function is defined so that this class can 00169 /// be a FdoNamedCollection element. 00170 /// 00171 /// \return 00172 /// Returns false 00173 /// 00174 FDO_API virtual FdoBoolean CanSetName() 00175 { 00176 return false; 00177 } 00178 /// 00179 /// \brief 00180 /// Gets an array of FdoSignatureDefinition objects that describe the different signatures 00181 /// supported by the function. 00182 /// 00183 FDO_API FdoReadOnlySignatureDefinitionCollection *GetSignatures(); 00184 /// 00185 /// \brief 00186 /// Returns true if the function is an aggregate function and false if it is a simple function. 00187 FDO_API bool IsAggregate(); 00188 /// 00189 00190 protected: 00191 bool m_isAggregate; 00192 wchar_t *m_name; 00193 wchar_t *m_description; 00194 FdoReadOnlySignatureDefinitionCollection *m_signatures; 00195 00196 }; 00197 #endif 00198 00199
Comments or suggestions? Send us feedback. |