FDO API Reference Feature Data Objects

BinaryLogicalOperator.h

Go to the documentation of this file.
00001 #ifndef _BINARYLOGICALOPERATOR_H_
00002 #define _BINARYLOGICALOPERATOR_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/Filter/Filter.h>
00029 #include <Fdo/Filter/LogicalOperator.h>
00030 
00031 /// \brief
00032 /// The FdoBinaryLogicalOperator class derives from FdoLogicalOperator and allows two
00033 /// filters to be combined via a logical "and" or a logical "or".
00034 class FdoBinaryLogicalOperator : public FdoLogicalOperator
00035 {
00036 protected:
00037 /// \cond DOXYGEN-IGNORE
00038     /// Constructs a default instance of an FdoBinaryLogicalOperator.
00039     FdoBinaryLogicalOperator();
00040 
00041     /// Constructs an instance of an FdoBinaryLogicalOperator using the specified
00042     /// arguments.
00043     FdoBinaryLogicalOperator(FdoFilter* leftOperand, FdoBinaryLogicalOperations operation, FdoFilter* rightOperand);
00044 
00045     virtual ~FdoBinaryLogicalOperator();
00046 
00047     virtual void Dispose();
00048 /// \endcond
00049 
00050 public:
00051     /// \brief
00052     /// Constructs a default instance of an FdoBinaryLogicalOperator.
00053     /// 
00054     /// \return
00055     /// Returns FdoBinaryLogicalOperator
00056     /// 
00057     FDO_API static FdoBinaryLogicalOperator* Create();
00058 
00059     /// \brief
00060     /// Constructs an instance of an FdoBinaryLogicalOperator using the specified arguments.
00061     /// 
00062     /// \param leftOperand 
00063     /// Input left hand operand
00064     /// \param operation 
00065     /// Input operator
00066     /// \param rightOperand 
00067     /// Input right hand operand
00068     /// 
00069     /// \return
00070     /// Returns FdoBinaryLogicalOperator
00071     /// 
00072     FDO_API static FdoBinaryLogicalOperator* Create(FdoFilter* leftOperand, FdoBinaryLogicalOperations operation, FdoFilter* rightOperand);
00073 
00074     /// \brief
00075     /// Gets the operation to be performed between the two operands.
00076     /// 
00077     /// \return
00078     /// Returns the operation to be performed
00079     /// 
00080     FDO_API FdoBinaryLogicalOperations GetOperation();
00081 
00082     /// \brief
00083     /// Sets the operation to be performed between the two operands.
00084     /// 
00085     /// \param value 
00086     /// Input the operation to be performed
00087     /// 
00088     /// \return
00089     /// Returns nothing
00090     /// 
00091     FDO_API void SetOperation(FdoBinaryLogicalOperations value);
00092 
00093     /// \brief
00094     /// Gets the filter that defines the left operand.
00095     /// 
00096     /// \return
00097     /// Returns the filter that defines the left operand
00098     /// 
00099     FDO_API FdoFilter* GetLeftOperand();
00100 
00101     /// \brief
00102     /// Sets the filter that defines the left operand.
00103     /// 
00104     /// \param value 
00105     /// Input the filter that defines the left operand
00106     /// 
00107     /// \return
00108     /// Returns nothing
00109     /// 
00110     FDO_API void SetLeftOperand(FdoFilter* value);
00111 
00112     /// \brief
00113     /// Gets the filter that defines the right operand.
00114     /// 
00115     /// \return
00116     /// Returns the filter that defines the right operand
00117     /// 
00118     FDO_API FdoFilter* GetRightOperand();
00119 
00120     /// \brief
00121     /// Sets the filter that defines the right operand.
00122     /// 
00123     /// \param value 
00124     /// Input the filter that defines the right operand
00125     /// 
00126     /// \return
00127     /// Returns nothing
00128     /// 
00129     FDO_API void SetRightOperand(FdoFilter* value);
00130 
00131     /// \brief
00132     /// Overrides FdoFilter.Process to pass the FdoBinaryLogicalOperator to the
00133     /// appropriate filter processor operation.
00134     /// 
00135     /// \param p 
00136     /// Input filter processor
00137     /// 
00138     /// \return
00139     /// Returns nothing
00140     /// 
00141     FDO_API void Process(FdoIFilterProcessor* p);
00142 
00143 /// \cond DOXYGEN-IGNORE
00144     /// \brief
00145     /// This is an internal method. It returns the well defined text representation of the filter. 
00146     /// 
00147     /// \param pIdCol 
00148     /// A identifier collection that contains all the computed identifier used by the filter
00149     /// 
00150     /// \return
00151     /// Returns the well defined text string
00152     /// 
00153     FdoString* ToStringInternal( FdoIdentifierCollection *pIdCol );
00154 /// \endcond
00155 
00156 private:
00157     FdoFilter*                  m_leftOperand;
00158     FdoFilter*                  m_rightOperand;
00159     FdoBinaryLogicalOperations  m_operation;
00160 };
00161 #endif
00162 
00163 

Comments or suggestions? Send us feedback.