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 dataaccess/query/Function.h.

Member Typedef Documentation

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

Definition at line 58 of file BaseVisitable.h.

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

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 dataaccess/query/Function.h.

Referenced by clone().

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

Copy constructor.

Definition at line 33 of file dataaccess/query/Function.cpp.

References te::common::Clone(), and m_args.

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

Virtual Destructor.

Definition at line 39 of file dataaccess/query/Function.cpp.

References te::common::FreeContents(), and m_args.

Member Function Documentation

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.
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.

Definition at line 79 of file dataaccess/query/Function.cpp.

References m_args.

Referenced by te::map::QueryEncoder::getExpression(), te::da::ObjectIdSet::getExpressionByInClause(), te::da::ObjectIdSet::setExpressionByInClause(), and te::map::QueryEncoder::visit().

te::da::Expression * te::da::Function::clone ( ) const
virtual
te::da::Expression * te::da::Function::getArg ( std::size_t  i) const
te::da::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.

Definition at line 73 of file dataaccess/query/Function.cpp.

References m_args.

Member Data Documentation

std::vector<Expression*> te::da::Function::m_args
protected
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 dataaccess/query/Function.h.

Referenced by operator=().


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