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

# Filter.h

Go to the documentation of this file.

    00001 #ifndef _FILTER_H_
    00002 #define _FILTER_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/Filter/BinaryLogicalOperations.h>
    00028 #include <Fdo/Commands/IdentifierCollection.h>
    00029
    00030 class FdoIFilterProcessor;
    00031
    00032 /// \brief
    00033 /// The FdoFilter abstract class is a base class for condition and operator classes
    00034 /// that can occur in a filter expression tree. The FdoFilter class contains
    00035 /// operations for converting between the text and expression tree representation
    00036 /// of a filter.
    00037 class FdoFilter : public FdoIDisposable
    00038 {
    00039 /// \cond DOXYGEN-IGNORE
    00040 protected:
    00041     FdoFilter();
    00042     virtual ~FdoFilter();
    00043 /// \endcond
    00044
    00045 public:
    00046     /// \brief
    00047     /// Static operation that parses the well defined text representation and
    00048     /// returns a Filter instance.
    00049     ///
    00050     /// \param filterText
    00051     /// Input well defined text string
    00052     ///
    00053     /// \return
    00054     /// Returns root node of parse tree
    00055     ///
    00056     FDO_API static FdoFilter* Parse(FdoString* filterText);
    00057
    00058     /// \brief
    00059     /// Abstract operation that takes an FdoIFilterProcessor as an argument.
    00060     /// Concrete filter subclasses must override this method and pass themselves
    00061     /// as an argument to the appropriate filter processor operation.
    00062     ///
    00063     /// \param p
    00064     /// Input filter processor
    00065     ///
    00066     /// \return
    00067     /// Returns nothing
    00068     ///
    00069     FDO_API virtual void Process(FdoIFilterProcessor* p) = 0;
    00070
    00071     /// \brief
    00072     /// Converts the filter expression to its well
    00073     /// defined text representation.
    00074     ///
    00075     /// \return
    00076     /// Returns well defined text string
    00077     ///
    00078     FDO_API FdoString* ToString();
    00079
    00080 /// \cond DOXYGEN-IGNORE
    00081
    00082     /// \brief
    00083     /// This is an internal method. It returns the well defined text representation of the filter.
    00084     ///
    00085     /// \param pIdCol
    00086     /// A identifier collection that contains all the computed identifier used by the filter
    00087     ///
    00088     /// \return
    00089     /// Returns the well defined text string
    00090     ///
    00091     virtual FdoString* ToStringInternal( FdoIdentifierCollection *pIdCol ) = 0;
    00092 /// \endcond
    00093
    00094     /// \brief
    00095     /// Static operation that combines two filters using the specified binary
    00096     /// logical operation.
    00097     ///
    00098     /// \param lhs
    00099     /// Input left hand expression as filter expression
    00100     /// \param operation
    00101     /// Input binary logical operation
    00102     /// \param rhs
    00103     /// Input right hand expression as filter expression
    00104     ///
    00105     /// \return
    00106     /// Returns new filter node
    00107     ///
    00108     FDO_API static FdoFilter* Combine(FdoFilter* lhs, FdoBinaryLogicalOperations operation, FdoFilter* rhs);
    00109
    00110     /// \brief
    00111     /// Static operation that combines two filters using the specified binary
    00112     /// logical operation.
    00113     ///
    00114     /// \param lhs
    00115     /// Input left hand expression as well defined text string
    00116     /// \param operation
    00117     /// Input binary logical operation
    00118     /// \param rhs
    00119     /// Input right hand expression as filter expression
    00120     ///
    00121     /// \return
    00122     /// Returns new filter node
    00123     ///
    00124     FDO_API static FdoFilter* Combine(FdoString* lhs, FdoBinaryLogicalOperations operation, FdoFilter* rhs);
    00125
    00126     /// \brief
    00127     /// Static operation that combines two filters using the specified binary
    00128     /// logical operation.
    00129     ///
    00130     /// \param lhs
    00131     /// Input left hand expression as filter expression
    00132     /// \param operation
    00133     /// Input binary logical operation
    00134     /// \param rhs
    00135     /// Input right hand expression as well defined text string
    00136     ///
    00137     /// \return
    00138     /// Returns new filter node
    00139     ///
    00140     FDO_API static FdoFilter* Combine(FdoFilter* lhs, FdoBinaryLogicalOperations operation, FdoString* rhs);
    00141
    00142     /// \brief
    00143     /// Static operation that combines two filters using the specified binary
    00144     /// logical operation.
    00145     ///
    00146     /// \param lhs
    00147     /// Input left hand expression as well defined text string
    00148     /// \param operation
    00149     /// Input binary logical operation
    00150     /// \param rhs
    00151     /// Input right hand expression as well defined text string
    00152     ///
    00153     /// \return
    00154     /// Returns new filter node
    00155     ///
    00156     FDO_API static FdoFilter* Combine(FdoString* lhs, FdoBinaryLogicalOperations operation, FdoString* rhs);
    00157
    00158 /// \cond DOXYGEN-IGNORE
    00159 protected:
    00160     wchar_t*    m_toString;
    00161 /// \endcond
    00162 };
    00163 #endif
    00164
    00165

Please send us your comment about this page