FDO API Reference Feature Data Objects

Function.h

Go to the documentation of this file.
00001 #ifndef _FUNCTION_H_
00002 #define _FUNCTION_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/Expression/Expression.h>
00028 #include <Fdo/Expression/ExpressionCollection.h>
00029 
00030 /// \brief
00031 /// The FdoFunction class derives from FdoExpression and represents a function call. As
00032 /// such it defines the name of the function and the collection of arguments to
00033 /// be passed to it.
00034 class FdoFunction : public FdoExpression
00035 {
00036 protected:
00037 /// \cond DOXYGEN-IGNORE
00038     /// Constructs a default instance of an FdoFunction.
00039     FdoFunction();
00040 
00041     /// Constructs an instance of a function using the specified arguments.
00042     FdoFunction(FdoString* name, FdoExpression** arguments, FdoInt32 numArgs);
00043 
00044     /// Default destructor for FdoFunction.
00045     virtual ~FdoFunction();
00046 
00047     virtual void Dispose();
00048 /// \endcond
00049 
00050 public:
00051     /// \brief
00052     /// Constructs a default instance of an FdoFunction.
00053     /// 
00054     /// \return
00055     /// Returns FdoFunction class
00056     /// 
00057     FDO_API static FdoFunction* Create();
00058 
00059     /// \brief
00060     /// Constructs an instance of a function using the specified arguments.
00061     /// 
00062     /// \param name 
00063     /// Input name of the function
00064     /// \param arguments 
00065     /// Input pointer to arguments
00066     /// \param numArgs 
00067     /// Input number of arguments
00068     /// 
00069     /// \return
00070     /// Returns FdoFunction
00071     /// 
00072     FDO_API static FdoFunction* Create(FdoString* name, FdoExpression** arguments, FdoInt32 numArgs);
00073 
00074     /// \brief
00075     /// Constructs an instance of a function using the specified arguments.
00076     /// 
00077     /// \param name 
00078     /// Input name of the function
00079     /// \param arguments 
00080     /// Input arguments as collection
00081     /// 
00082     /// \return
00083     /// Returns FdoFunction
00084     /// 
00085     FDO_API static FdoFunction* Create(FdoString* name, FdoExpressionCollection* arguments);
00086 
00087     /// \brief
00088     /// Gets the name of the function.
00089     /// 
00090     /// \return
00091     /// Returns name of the function
00092     /// 
00093     FDO_API FdoString* GetName();
00094 
00095     /// \brief
00096     /// Sets the name of the function.
00097     /// 
00098     /// \param value 
00099     /// Input name of the function
00100     /// 
00101     /// \return
00102     /// Returns nothing
00103     /// 
00104     FDO_API void SetName(FdoString* value);
00105 
00106     /// \brief
00107     /// Gets the FdoExpressionCollection that contains the arguments to the
00108     /// function.
00109     /// 
00110     /// \return
00111     /// Returns arguments as collection
00112     /// 
00113     FDO_API FdoExpressionCollection* GetArguments();
00114 
00115     /// \brief
00116     /// Overrides FdoExpression.Process to pass the FdoFunction to the appropriate
00117     /// expression processor operation.
00118     /// 
00119     /// \param p 
00120     /// Input expression processor
00121     /// 
00122     /// \return
00123     /// Returns nothing
00124     /// 
00125     FDO_API void Process(FdoIExpressionProcessor* p);
00126 
00127     /// \brief
00128     /// Returns the well defined text representation of this expression.
00129     /// 
00130     /// \return
00131     /// Returns the well defined text representation of this expression
00132     /// 
00133     FDO_API FdoString* ToString();
00134 
00135     /// \brief
00136     /// This is an internal method. It returns the well defined text representation of the expression. 
00137     /// 
00138     /// \param pIdCol 
00139     /// A identifier collection that contains all the computed identifier used by the filter
00140     /// 
00141     /// \return
00142     /// Returns the well defined text string
00143     /// 
00144     FdoString* ToStringInternal( FdoIdentifierCollection *pIdCol );
00145 
00146 private:
00147     wchar_t*                    m_name;
00148     FdoExpressionCollection*    ExpArguments;
00149 };
00150 #endif
00151 
00152 

Comments or suggestions? Send us feedback.