te::fe::BinaryComparisonOp Class Referenceabstract

A class for binary comparison operators. More...

#include <BinaryComparisonOp.h>

Inheritance diagram for te::fe::BinaryComparisonOp:
te::fe::ComparisonOp te::fe::AbstractOp te::common::BaseVisitable< Visitor > te::fe::PropertyIsEqualTo te::fe::PropertyIsGreaterThan te::fe::PropertyIsGreaterThanOrEqualTo te::fe::PropertyIsLessThan te::fe::PropertyIsLessThanOrEqualTo te::fe::PropertyIsNotEqualTo

Public Types

typedef void ReturnType
 
typedef Visitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const =0
 It call the visit method from the guest object. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 BinaryComparisonOp (const char *opName=0)
 It initializes a new BinaryComparisonOp. More...
 
 BinaryComparisonOp (const char *opName, Expression *f, Expression *s)
 It initializes a new BinaryComparisonOp. More...
 
virtual ~BinaryComparisonOp ()
 Virtual destructor. More...
 
Accessor methods

Methods used to get or set properties.

void setFirst (Expression *first)
 It sets the first operand. More...
 
ExpressiongetFirst () const
 It returns the first operand. More...
 
void setSecond (Expression *second)
 It sets the second operand. More...
 
ExpressiongetSecond () const
 It returns the second operand. More...
 
void enableMatchCase ()
 It enables the match case flag. So comparisons will be case sensitive. More...
 
void disableMatchCase ()
 It disables the match case flag. So comparisons will not be case sensitive. More...
 
ComparisonOpclone () const
 It creates a new copy of this object. More...
 
Accessor methods

Methods used to get or set properties.

const char * getName () const
 It returns the operator name. More...
 
void setName (const char *opName)
 It sets the operator name. More...
 

Protected Attributes

Expressionm_first
 first operand (mandatory). More...
 
bool m_matchCase
 Optional (default: true). More...
 
const char * m_name
 Operator name. More...
 
Expressionm_second
 second operand (mandatory). More...
 

Detailed Description

A class for binary comparison operators.

The Common Catalog Query Language defines a standard set of comparison operators (=, <, >, >=, <=, <>). These comparison operators are encoded using the complex type BinaryComparisonOp. This type definition includes the matchCase attribute which is Boolean type and controls whether string comparisons are case sensitive or not. A true value means that string comparisons are case sensitive. This is the default value. A false value means that string comparisons are case insensitive.
The following operators are defined in the Filter Encoding specification:

  • PropertyIsEqualTo
  • PropertyIsPropertyIsNotEqualTo
  • PropertyIsPropertyIsLessThan
  • PropertyIsPropertyIsGreaterThan
  • PropertyIsPropertyIsLessThanOrEqualTo
  • PropertyIsPropertyIsGreaterThanOrEqualTo
See also
ComparisonOp, Expression

Definition at line 69 of file BinaryComparisonOp.h.

Member Typedef Documentation

typedef void te::common::BaseVisitable< Visitor , void >::ReturnType
inherited

Definition at line 58 of file BaseVisitable.h.

typedef Visitor te::common::BaseVisitable< Visitor , void >::VisitorType
inherited

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

te::fe::BinaryComparisonOp::BinaryComparisonOp ( const char *  opName = 0)

It initializes a new BinaryComparisonOp.

Parameters
opNameThe comparison operator name.
Note
The BinaryComparisonOp will not take the ownership of the given name.

Definition at line 36 of file BinaryComparisonOp.cpp.

Referenced by clone().

te::fe::BinaryComparisonOp::BinaryComparisonOp ( const char *  opName,
Expression f,
Expression s 
)

It initializes a new BinaryComparisonOp.

Parameters
opNameThe BinaryComparisonOp operator name.
fThe first expression. The BinaryComparisonOp will take the ownership of the given expression.
sThe second expression. The BinaryComparisonOp will take the ownership of the given expression.
Note
The BinaryComparisonOp will not take the ownership of the given name.

Definition at line 44 of file BinaryComparisonOp.cpp.

te::fe::BinaryComparisonOp::~BinaryComparisonOp ( )
virtual

Virtual destructor.

Definition at line 52 of file BinaryComparisonOp.cpp.

References m_first, and m_second.

Member Function Documentation

virtual ReturnType te::common::BaseVisitable< Visitor , void >::accept ( VisitorType guest) const
pure virtualinherited

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.
te::fe::ComparisonOp * te::fe::BinaryComparisonOp::clone ( ) const
virtual
void te::fe::BinaryComparisonOp::disableMatchCase ( )

It disables the match case flag. So comparisons will not be case sensitive.

Definition at line 85 of file BinaryComparisonOp.cpp.

References m_matchCase.

Referenced by clone().

void te::fe::BinaryComparisonOp::enableMatchCase ( )

It enables the match case flag. So comparisons will be case sensitive.

Note
This is the default state.

Definition at line 80 of file BinaryComparisonOp.cpp.

References m_matchCase.

Referenced by clone().

te::fe::Expression * te::fe::BinaryComparisonOp::getFirst ( ) const

It returns the first operand.

Returns
The first operand.

Definition at line 64 of file BinaryComparisonOp.cpp.

References m_first.

Referenced by BinaryComparsionOpWriter(), and te::map::QueryEncoder::visit().

const char* te::fe::AbstractOp::getName ( ) const
inlineinherited

It returns the operator name.

Returns
The operator name.

Definition at line 82 of file AbstractOp.h.

Referenced by GetQualifiedName(), te::map::QueryEncoder::visit(), and te::fe::serialize::AbstractOp::write().

te::fe::Expression * te::fe::BinaryComparisonOp::getSecond ( ) const

It returns the second operand.

Returns
The second operand.

Definition at line 75 of file BinaryComparisonOp.cpp.

References m_second.

Referenced by BinaryComparsionOpWriter(), te::fe::GetFilterStepValues(), te::fe::GetFilterUniqueValue(), and te::map::QueryEncoder::visit().

void te::fe::BinaryComparisonOp::setFirst ( Expression first)

It sets the first operand.

Parameters
firstThe first operand.
Note
It will take the ownership of the first operand.

Definition at line 58 of file BinaryComparisonOp.cpp.

References m_first.

Referenced by clone().

void te::fe::AbstractOp::setName ( const char *  opName)
inlineinherited
void te::fe::BinaryComparisonOp::setSecond ( Expression second)

It sets the second operand.

Parameters
secondThe second operand.
Note
It will take the ownership of the second operand.

Definition at line 69 of file BinaryComparisonOp.cpp.

References m_second.

Referenced by clone().

Member Data Documentation

Expression* te::fe::BinaryComparisonOp::m_first
protected

first operand (mandatory).

Definition at line 159 of file BinaryComparisonOp.h.

Referenced by clone(), getFirst(), setFirst(), and ~BinaryComparisonOp().

bool te::fe::BinaryComparisonOp::m_matchCase
protected

Optional (default: true).

Definition at line 161 of file BinaryComparisonOp.h.

Referenced by clone(), disableMatchCase(), and enableMatchCase().

Expression* te::fe::BinaryComparisonOp::m_second
protected

second operand (mandatory).

Definition at line 160 of file BinaryComparisonOp.h.

Referenced by clone(), getSecond(), setSecond(), and ~BinaryComparisonOp().


The documentation for this class was generated from the following files: