The definition of a function that can be used in a query object. More...
#include <FunctionDefn.h>
Public Member Functions | |
| void | add (FunctionParameter *p) |
| It adds the parameter to the function list of parameters. | |
| FunctionDefn (const std::string &name, int retValType=te::dt::VOID_TYPE, bool isAggregate=false, std::string *description=0) | |
| Constructor. | |
| std::string * | getDescription () const |
| It returns a brief description about the function. | |
| const std::string & | getName () const |
| It returns the function name. | |
| std::size_t | getNumParams () const |
| It returns the number of parameters for the function. | |
| int | getRetValType () const |
| It returns the data type of the return value. | |
| bool | isAggregate () const |
| It returns true if it is an aggregate function, otherwise, returns false. | |
| FunctionParameter * | operator[] (std::size_t i) const |
| It returns the i-th function parameter. | |
| void | setDescription (std::string *description) |
| It sets a brief description about the function. | |
| void | SetIsAggregate (bool a) |
| It tells if the function is an aggregate function or not. | |
| void | setName (const std::string &name) |
| It sets the function name;. | |
| void | setRetValType (int r) |
| It sets the data type of the return value. | |
| ~FunctionDefn () | |
| Destructor. | |
Protected Attributes | |
| std::string * | m_description |
| A brief description of the function. | |
| bool | m_isAggregate |
| A flag that defines if the function is an aggregate one. | |
| std::string | m_name |
| The function name. It may be an operator symbol or just a regular name like st_intersects. | |
| std::vector< FunctionParameter * > | m_params |
| The list of arguments. | |
| int | m_retValType |
| Data type of the return value. | |
The definition of a function that can be used in a query object.
All functions must have a name in lower case letters.
Definition at line 56 of file FunctionDefn.h.
| te::da::FunctionDefn::FunctionDefn | ( | const std::string & | name, |
| int | retValType = te::dt::VOID_TYPE, | ||
| bool | isAggregate = false, | ||
| std::string * | description = 0 ) |
Constructor.
| name | The function name. |
| retValType | The return value type (void by default). |
| isAggregate | Tells if function is an aggregate function (false by default). |
| description | A brief description about the function (NULL by default). The FunctionDefn will take the ownership of the given description. |
References isAggregate(), and te::dt::VOID_TYPE.
| te::da::FunctionDefn::~FunctionDefn | ( | ) |
Destructor.
|
inline |
It adds the parameter to the function list of parameters.
| p | The parameter to be added. |
Definition at line 159 of file FunctionDefn.h.
References m_params.
|
inline |
It returns a brief description about the function.
Definition at line 125 of file FunctionDefn.h.
References m_description.
|
inline |
It returns the function name.
Definition at line 81 of file FunctionDefn.h.
References m_name.
|
inline |
It returns the number of parameters for the function.
Definition at line 139 of file FunctionDefn.h.
References m_params.
|
inline |
It returns the data type of the return value.
Definition at line 97 of file FunctionDefn.h.
References m_retValType.
|
inline |
It returns true if it is an aggregate function, otherwise, returns false.
Definition at line 111 of file FunctionDefn.h.
References m_isAggregate.
Referenced by FunctionDefn().
|
inline |
It returns the i-th function parameter.
| i | The parameter position. |
Definition at line 150 of file FunctionDefn.h.
References m_params.
| void te::da::FunctionDefn::setDescription | ( | std::string * | description | ) |
It sets a brief description about the function.
| description | A brief description about the function. The FunctionDefn will take the ownership of the given description. |
|
inline |
It tells if the function is an aggregate function or not.
| a | If true the function is an aggeragte function otherwise it is not. |
Definition at line 118 of file FunctionDefn.h.
References m_isAggregate.
|
inline |
It sets the function name;.
| name | The function name. |
Definition at line 90 of file FunctionDefn.h.
References m_name.
|
inline |
It sets the data type of the return value.
| r | The data type of the return value. |
Definition at line 104 of file FunctionDefn.h.
References m_retValType.
|
protected |
A brief description of the function.
Definition at line 167 of file FunctionDefn.h.
Referenced by getDescription().
|
protected |
A flag that defines if the function is an aggregate one.
Definition at line 166 of file FunctionDefn.h.
Referenced by isAggregate(), and SetIsAggregate().
|
protected |
The function name. It may be an operator symbol or just a regular name like st_intersects.
Definition at line 163 of file FunctionDefn.h.
|
protected |
The list of arguments.
Definition at line 164 of file FunctionDefn.h.
Referenced by add(), getNumParams(), and operator[]().
|
protected |
Data type of the return value.
Definition at line 165 of file FunctionDefn.h.
Referenced by getRetValType(), and setRetValType().