te::da::Function Class Referenceabstract

A class that models a Function expression. More...

#include <Function.h>

Inheritance diagram for te::da::Function:
te::da::Expression te::common::BaseVisitable< QueryVisitor > te::da::BinaryFunction te::da::GeometryType te::da::In te::da::Like te::da::ST_Area te::da::ST_Buffer te::da::ST_Centroid te::da::ST_ConvexHull te::da::ST_DistanceBuffer te::da::ST_Envelope te::da::ST_Extent te::da::ST_IsClosed te::da::ST_IsEmpty te::da::ST_IsValid te::da::ST_Length te::da::ST_MakeValid te::da::ST_Multi te::da::ST_NPoints te::da::ST_Perimeter te::da::ST_Relate te::da::ST_StartPoint te::da::ST_Transform te::da::Substring te::da::UnaryFunction

Public Types

typedef void ReturnType
 
typedef QueryVisitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const=0
 It call the visit method from the guest object. More...
 
void add (Expression *arg)
 It adds the argument to the function list of arguments. More...
 
Expressionclone () const
 It creates a new copy of this expression. More...
 
TE_DEFINE_VISITABLE Function (const std::string &name)
 Constructor. More...
 
 Function (const Function &rhs)
 Copy constructor. More...
 
ExpressiongetArg (std::size_t i) const
 It returns the i-th function argument. More...
 
const std::string & getName () const
 It returns the function name. More...
 
std::size_t getNumArgs () const
 It returns the number of arguments informed to the function. More...
 
Functionoperator= (const Function &rhs)
 
Expressionoperator[] (std::size_t i) const
 It returns the i-th function argument. More...
 
virtual ~Function ()
 Virtual Destructor. More...
 

Protected Attributes

std::vector< Expression * > m_args
 The list of arguments. More...
 
std::string m_name
 The function name. May be an operator symbol or just a regular name like ST_Intersects. More...
 

Detailed Description

A class that models a Function expression.

See also
Expression

Definition at line 47 of file Function.h.

Member Typedef Documentation

◆ ReturnType

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

Definition at line 58 of file BaseVisitable.h.

◆ VisitorType

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

◆ Function() [1/2]

TE_DEFINE_VISITABLE te::da::Function::Function ( const std::string &  name)
inline

Constructor.

Parameters
nameThe function name.
Note
See FunctionNames.h for a list of common names.

Definition at line 60 of file Function.h.

◆ Function() [2/2]

te::da::Function::Function ( const Function rhs)

Copy constructor.

◆ ~Function()

virtual te::da::Function::~Function ( )
virtual

Virtual Destructor.

Member Function Documentation

◆ accept()

virtual ReturnType te::common::BaseVisitable< QueryVisitor , 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::da::Function::add ( Expression arg)

It adds the argument to the function list of arguments.

Parameters
argThe argument to be added.
Note
The Function will take the ownership of the given argument.

◆ clone()

◆ getArg()

Expression* te::da::Function::getArg ( std::size_t  i) const

It returns the i-th function argument.

Parameters
iThe argument position.
Returns
The it-th function argument.

◆ getName()

const std::string& te::da::Function::getName ( ) const
inline

It returns the function name.

Returns
The function name.

Definition at line 79 of file Function.h.

◆ getNumArgs()

std::size_t te::da::Function::getNumArgs ( ) const

It returns the number of arguments informed to the function.

Returns
The number of parameters.

◆ operator=()

Function& te::da::Function::operator= ( const Function rhs)

Assignment operator.

◆ operator[]()

Expression* te::da::Function::operator[] ( std::size_t  i) const

It returns the i-th function argument.

Parameters
iThe argument position.
Returns
The it-th function argument.

Member Data Documentation

◆ m_args

std::vector<Expression*> te::da::Function::m_args
protected

The list of arguments.

Definition at line 118 of file Function.h.

◆ m_name

std::string te::da::Function::m_name
protected

The function name. May be an operator symbol or just a regular name like ST_Intersects.

Definition at line 117 of file Function.h.


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