FDO API Reference Feature Data Objects

Parameter.h

Go to the documentation of this file.
00001 #ifndef _PARAMETER_H_
00002 #define _PARAMETER_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/ValueExpression.h>
00028 
00029 /// \brief
00030 /// The FdoParameter class derives from FdoValueExpression and represents a
00031 /// substitution parameter in the expression. FdoParameters are represented by a
00032 /// name: when expressions are evaluated, the caller must supply a value to be
00033 /// bound to each parameter name.
00034 /// \remarks
00035 /// For information on how to set the value of a parameter, see the 
00036 /// FdoICommand interface and FdoParameterValue.
00037 class FdoParameter : public FdoValueExpression
00038 {
00039 protected:
00040 /// \cond DOXYGEN-IGNORE
00041     /// Constructs a default instance of a parameter.
00042     FdoParameter();
00043 
00044     /// Constructs an instance of a parameter using the specified arguments.
00045     FdoParameter(FdoString* name);
00046 
00047     /// Default destructor for parameter.
00048     virtual ~FdoParameter();
00049 
00050     virtual void Dispose();
00051 /// \endcond
00052 
00053 public:
00054 
00055     /// \brief
00056     /// Constructs a default instance of a parameter.
00057     /// 
00058     /// \return
00059     /// Returns FdoParameter
00060     /// 
00061     FDO_API static FdoParameter* Create();
00062 
00063     /// \brief
00064     /// Constructs an instance of a parameter using the specified arguments.
00065     /// 
00066     /// \param name 
00067     /// Input parameter name
00068     /// 
00069     /// \return
00070     /// Returns FdoParameter
00071     /// 
00072     FDO_API static FdoParameter* Create(FdoString* name);
00073 
00074     /// \brief
00075     /// Gets the name of the parameter.
00076     /// 
00077     /// \return
00078     /// Returns the parameter name
00079     /// 
00080     FDO_API FdoString* GetName();
00081 
00082     /// \brief
00083     /// Sets the name of the parameter.
00084     /// 
00085     /// \param value 
00086     /// Input parameter name
00087     /// 
00088     /// \return
00089     /// Returns nothing
00090     /// 
00091     FDO_API void SetName(FdoString* value);
00092 
00093     /// \brief
00094     /// Overrides FdoExpression.Process to pass the FdoParameter to the appropriate
00095     /// expression processor operation.
00096     /// 
00097     /// \param p 
00098     /// Input an FdoIExpressionProcessor
00099     /// 
00100     /// \return
00101     /// Returns nothing
00102     /// 
00103     FDO_API void Process(FdoIExpressionProcessor* p);
00104 
00105     /// \brief
00106     /// Returns the well defined text representation of this expression.
00107     /// 
00108     /// \return
00109     /// Returns the well defined text string
00110     /// 
00111     FDO_API FdoString* ToString();
00112 
00113 private:
00114     wchar_t*    m_name;
00115 };
00116 #endif
00117 
00118 

Comments or suggestions? Send us feedback.