FDO API Reference Feature Data Objects

UnaryExpression.h

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

Comments or suggestions? Send us feedback.