- Main Page
- Related Pages
- Modules
- Classes
- Files

# Expression.h

Go to the documentation of this file.

    00001 #ifndef _EXPRESSION_H_
    00002 #define _EXPRESSION_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
    00028 class FdoIExpressionProcessor;
    00029 class FdoIdentifierCollection;
    00030
    00031 /// \brief
    00032 /// FdoExpression is an abstract base class that forms the root of an expression
    00033 /// tree. The FdoExpression class contains operations for converting between the
    00034 /// well defined text representation and the object representation of an
    00035 /// expression.
    00036 class FdoExpression : public FdoIDisposable
    00037 {
    00038 protected:
    00039 /// \cond DOXYGEN-IGNORE
    00040     FdoExpression();
    00041     virtual ~FdoExpression();
    00042 /// \endcond
    00043
    00044 public:
    00045     /// \brief
    00046     /// Static operation that parses the specified text and returns an
    00047     /// expression. An exception is thrown if the text does not conform to the
    00048     /// well defined text representation of an expression.
    00049     ///
    00050     /// \param expressionText
    00051     /// Input expression in well defined text
    00052     ///
    00053     /// \return
    00054     /// Returns parse tree root node
    00055     ///
    00056     FDO_API static FdoExpression* Parse(FdoString* expressionText);
    00057
    00058     /// \brief
    00059     /// Abstract operation that takes an FdoIExpressionProcessor as an argument.
    00060     /// Concrete expression subclasses must override this method and pass
    00061     /// themselves as an argument to the appropriate expression processor
    00062     /// operation.
    00063     ///
    00064     /// \param p
    00065     /// Input expression processor
    00066     ///
    00067     /// \return
    00068     /// Returns nothing
    00069     ///
    00070     FDO_API virtual void Process(FdoIExpressionProcessor* p) = 0;
    00071
    00072     /// \brief
    00073     /// Abstract operation that returns the well defined text representation of
    00074     /// this expression.
    00075     ///
    00076     /// \return
    00077     /// Returns the well defined text string
    00078     ///
    00079     FDO_API virtual FdoString* ToString() = 0;
    00080
    00081     /// \brief
    00082     /// This is an internal method. It returns the well defined text representation of the expression.
    00083     ///
    00084     /// \param pIdCol
    00085     /// A identifier collection that contains all the computed identifier used by the filter
    00086     ///
    00087     /// \return
    00088     /// Returns the well defined text string
    00089     ///
    00090     virtual FdoString* ToStringInternal( FdoIdentifierCollection *pIdCol );
    00091
    00092 protected:
    00093     wchar_t*    m_toString;
    00094 };
    00095 #endif
    00096
    00097

Please send us your comment about this page