te::fe::BinaryLogicOp Class Referenceabstract

A logical operator can be used to combine two or more conditional expressions. More...

#include <BinaryLogicOp.h>

Inheritance diagram for te::fe::BinaryLogicOp:
te::fe::LogicOp te::fe::AbstractOp te::common::BaseVisitable< Visitor > te::fe::And te::fe::Or

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.

 BinaryLogicOp (const char *opName=0)
 It initializes a new BinaryLogicOp. More...
 
 BinaryLogicOp (const char *opName, AbstractOp *first, AbstractOp *second)
 It initializes a new BinaryLogicOp. More...
 
virtual ~BinaryLogicOp ()
 Virtual destructor. More...
 
Accessor methods

Methods used to get or set properties.

std::size_t size () const
 It returns the number of operands. More...
 
void add (AbstractOp *o)
 It adds the operand to the operand list. More...
 
AbstractOpoperator[] (std::size_t i) const
 It returns a specified operand. More...
 
AbstractOpgetOp (std::size_t i) const
 It returns a specified operand. More...
 
BinaryLogicOpclone () 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

const char * m_name
 Operator name. More...
 
std::vector< AbstractOp * > m_ops
 Mandatory at least two. More...
 

Detailed Description

A logical operator can be used to combine two or more conditional expressions.

The following operators are defined in the Filter Encoding specification:

See also
LogicOp, UnaryLogicOp

Definition at line 58 of file BinaryLogicOp.h.

Member Typedef Documentation

◆ ReturnType

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

Definition at line 58 of file BaseVisitable.h.

◆ VisitorType

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

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

◆ BinaryLogicOp() [1/2]

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

It initializes a new BinaryLogicOp.

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

◆ BinaryLogicOp() [2/2]

te::fe::BinaryLogicOp::BinaryLogicOp ( const char *  opName,
AbstractOp first,
AbstractOp second 
)

It initializes a new BinaryLogicOp.

Parameters
opNameThe BinaryLogicOp operator name.
firstThe first operand.
secondThe second operand.
Note
The BinaryLogicOp will not take the ownership of the given name.
The BinaryLogicOp object will take the ownership of the operands.

◆ ~BinaryLogicOp()

virtual te::fe::BinaryLogicOp::~BinaryLogicOp ( )
virtual

Virtual destructor.

Member Function Documentation

◆ accept()

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.

◆ add()

void te::fe::BinaryLogicOp::add ( AbstractOp o)

It adds the operand to the operand list.

Parameters
oThe operand to be added.
Note
The BinaryLogicOp object will take the ownership of the operand.

◆ clone()

BinaryLogicOp* te::fe::BinaryLogicOp::clone ( ) const
virtual

It creates a new copy of this object.

Implements te::fe::AbstractOp.

◆ getName()

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.

◆ getOp()

AbstractOp* te::fe::BinaryLogicOp::getOp ( std::size_t  i) const

It returns a specified operand.

Parameters
iThe index of desired operand.
Returns
A specified operand.
Note
The method will not check the index range.

◆ operator[]()

AbstractOp* te::fe::BinaryLogicOp::operator[] ( std::size_t  i) const

It returns a specified operand.

Parameters
iThe index of desired operand.
Returns
A specified operand.
Note
The method will not check the index range.

◆ setName()

void te::fe::AbstractOp::setName ( const char *  opName)
inlineinherited

It sets the operator name.

Parameters
opNameThe operator name.

Definition at line 89 of file AbstractOp.h.

◆ size()

std::size_t te::fe::BinaryLogicOp::size ( ) const

It returns the number of operands.

Returns
The number of operands.

Member Data Documentation

◆ m_name

const char* te::fe::AbstractOp::m_name
protectedinherited

Operator name.

Definition at line 123 of file AbstractOp.h.

◆ m_ops

std::vector<AbstractOp*> te::fe::BinaryLogicOp::m_ops
protected

Mandatory at least two.

Definition at line 148 of file BinaryLogicOp.h.


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