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 00031 /// \brief 00032 /// The FdoFunctionDefinition class contains metadata that describes a function and its arguments. 00033 class FdoFunctionDefinition : public FdoIDisposable 00034 { 00035 protected: 00036 /// \cond DOXYGEN-IGNORE 00037 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00038 FdoFunctionDefinition(FdoString* name, FdoString* description, FdoDataType returnType, FdoArgumentDefinitionCollection* arguments); 00039 00040 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00041 FdoFunctionDefinition(FdoString* name, FdoString* description, FdoPropertyType returnPropertyType, FdoDataType returnType, FdoArgumentDefinitionCollection* arguments); 00042 00043 /// Constructs an instance of an FdoFunctionDefinition using default values. 00044 FdoFunctionDefinition(); 00045 00046 virtual ~FdoFunctionDefinition(); 00047 00048 virtual void Dispose(); 00049 /// \endcond 00050 00051 public: 00052 /// \brief 00053 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00054 /// 00055 /// \param name 00056 /// Input the name of the function. 00057 /// \param description 00058 /// Input a brief description. 00059 /// \param returnType 00060 /// Input the function return type 00061 /// \param arguments 00062 /// Input the argument definition list 00063 /// \param length 00064 /// Input the number of arguments 00065 /// 00066 /// \return 00067 /// Returns FdoFunctionDefinition 00068 /// 00069 FDO_API static FdoFunctionDefinition* Create(FdoString* name, FdoString* description, FdoDataType returnType, FdoArgumentDefinitionCollection* arguments); 00070 00071 /// \brief 00072 /// Constructs an instance of an FdoFunctionDefinition using the specified arguments. 00073 /// 00074 /// \param name 00075 /// Input the name of the function. 00076 /// \param description 00077 /// Input a brief description. 00078 /// \param returnProperty Type 00079 /// Input the function return property type 00080 /// \param returnType 00081 /// Input the function return data type (ignore it property type is not data) 00082 /// \param arguments 00083 /// Input the argument definition list 00084 /// \param length 00085 /// Input the number of arguments 00086 /// 00087 /// \return 00088 /// Returns FdoFunctionDefinition 00089 /// 00090 FDO_API static FdoFunctionDefinition* Create(FdoString* name, FdoString* description, FdoPropertyType returnPropertyType, FdoDataType returnType, FdoArgumentDefinitionCollection* arguments); 00091 00092 /// \brief 00093 /// Gets the name of the function. 00094 /// 00095 /// \return 00096 /// Returns the name of the function 00097 /// 00098 FDO_API FdoString* GetName(); 00099 /// \brief 00100 /// Gets a brief description of the function. 00101 /// 00102 /// \return 00103 /// Returns the description of the function 00104 /// 00105 FDO_API FdoString* GetDescription(); 00106 /// \brief 00107 /// Gets an array of FdoArgumentDefinition objects required for the function. 00108 /// 00109 /// \param length 00110 /// Output the number of argument definitions. 00111 /// 00112 /// \return 00113 /// Returns the list of argument definitions 00114 /// 00115 FDO_API FdoReadOnlyArgumentDefinitionCollection* GetArguments(); 00116 /// \brief 00117 /// Gets the FdoPropertyType of the function return value. 00118 /// 00119 /// \return 00120 /// Returns the function return property type 00121 /// 00122 FDO_API FdoPropertyType GetReturnPropertyType(); 00123 /// \brief 00124 /// Gets the FdoDataType of the function return value. 00125 /// This is only valid if the function return property type is FdoPropertyType_DataProperty. 00126 /// 00127 /// \return 00128 /// Returns the function return data type 00129 /// 00130 FDO_API FdoDataType GetReturnType(); 00131 /// \brief 00132 /// Indicates that this object allows its name 00133 /// to change. This function is defined so that this class can 00134 /// be a FdoNamedCollection element. 00135 /// 00136 /// \return 00137 /// Returns false 00138 /// 00139 FDO_API virtual FdoBoolean CanSetName() 00140 { 00141 return false; 00142 } 00143 00144 protected: 00145 wchar_t* m_name; 00146 wchar_t* m_description; 00147 FdoReadOnlyArgumentDefinitionCollection* m_arguments; 00148 FdoPropertyType m_returnPropertyType; 00149 FdoDataType m_returnDataType; 00150 }; 00151 #endif 00152 00153
Comments or suggestions? Send us feedback. |