#include <expression.h>
Public Types | |
| typedef TQPtrList< BaseExpr > | List |
| typedef TQPtrListIterator< BaseExpr > | ListIterator |
Public Member Functions | |
| BaseExpr (int token) | |
| virtual BaseExpr * | copy () const =0 |
| int | token () const |
| virtual Field::Type | type () |
| BaseExpr * | parent () const |
| virtual void | setParent (BaseExpr *p) |
| virtual bool | validate (ParseInfo &parseInfo) |
| virtual TQString | toString (QuerySchemaParameterValueListIterator *params=0)=0 |
| virtual void | getQueryParameters (QuerySchemaParameterList ¶ms)=0 |
| void | debug () |
| virtual TQString | debugString () |
| TQString | tokenToDebugString () |
| virtual TQString | tokenToString () |
| int | exprClass () const |
| NArgExpr * | toNArg () |
| UnaryExpr * | toUnary () |
| BinaryExpr * | toBinary () |
| ConstExpr * | toConst () |
| VariableExpr * | toVariable () |
| FunctionExpr * | toFunction () |
| QueryParameterExpr * | toQueryParameter () |
Static Public Member Functions | |
| static TQString | tokenToDebugString (int token) |
Protected Attributes | |
| int | m_cl |
| BaseExpr * | m_par |
| int | m_token |
Detailed Description
A base class for all expressions.
Definition at line 66 of file expression.h.
Member Typedef Documentation
◆ List
| typedef TQPtrList<BaseExpr> KexiDB::BaseExpr::List |
Definition at line 69 of file expression.h.
◆ ListIterator
| typedef TQPtrListIterator<BaseExpr> KexiDB::BaseExpr::ListIterator |
Definition at line 70 of file expression.h.
Constructor & Destructor Documentation
◆ BaseExpr()
| BaseExpr::BaseExpr | ( | int | token | ) |
Definition at line 67 of file expression.cpp.
◆ ~BaseExpr()
|
virtual |
Definition at line 74 of file expression.cpp.
Member Function Documentation
◆ copy()
|
pure virtual |
- Returns
- a deep copy of this object.
- Todo
- a nonpointer will be returned here when we move to implicit data sharing
Implemented in KexiDB::BinaryExpr, KexiDB::ConstExpr, KexiDB::FunctionExpr, KexiDB::NArgExpr, KexiDB::QueryParameterExpr, KexiDB::UnaryExpr, and KexiDB::VariableExpr.
◆ debug()
|
inline |
Definition at line 98 of file expression.h.
◆ debugString()
|
virtual |
Definition at line 83 of file expression.cpp.
◆ exprClass()
|
inline |
Definition at line 111 of file expression.h.
◆ getQueryParameters()
|
pure virtual |
Collects query parameters (messages and types) reculsively and saves them to params. The leaf nodes are objects of QueryParameterExpr class.
Implemented in KexiDB::BinaryExpr, KexiDB::ConstExpr, KexiDB::FunctionExpr, KexiDB::NArgExpr, KexiDB::QueryParameterExpr, KexiDB::UnaryExpr, and KexiDB::VariableExpr.
◆ parent()
|
inline |
Definition at line 83 of file expression.h.
◆ setParent()
|
inlinevirtual |
Definition at line 85 of file expression.h.
◆ toBinary()
| BinaryExpr * BaseExpr::toBinary | ( | ) |
Definition at line 116 of file expression.cpp.
◆ toConst()
| ConstExpr * BaseExpr::toConst | ( | ) |
Definition at line 117 of file expression.cpp.
◆ toFunction()
| FunctionExpr * BaseExpr::toFunction | ( | ) |
Definition at line 119 of file expression.cpp.
◆ token()
|
inline |
Definition at line 79 of file expression.h.
◆ tokenToDebugString() [1/2]
|
inline |
- Returns
- single character if the token is < 256 or token name, e.g. LESS_OR_EQUAL (for debugging).
Definition at line 104 of file expression.h.
◆ tokenToDebugString() [2/2]
|
static |
Definition at line 96 of file expression.cpp.
◆ tokenToString()
|
virtual |
- Returns
- string for token, like "<=" or ">"
Reimplemented in KexiDB::BinaryExpr.
Definition at line 107 of file expression.cpp.
◆ toNArg()
| NArgExpr * BaseExpr::toNArg | ( | ) |
Convenience type casts.
Definition at line 114 of file expression.cpp.
◆ toQueryParameter()
| QueryParameterExpr * BaseExpr::toQueryParameter | ( | ) |
Definition at line 120 of file expression.cpp.
◆ toString()
|
pure virtual |
- Returns
- string as a representation of this expression element by running recursive calls. param, if not 0, points to a list item containing value of a query parameter (used in QueryParameterExpr).
Implemented in KexiDB::BinaryExpr, KexiDB::ConstExpr, KexiDB::FunctionExpr, KexiDB::NArgExpr, KexiDB::QueryParameterExpr, KexiDB::UnaryExpr, and KexiDB::VariableExpr.
◆ toUnary()
| UnaryExpr * BaseExpr::toUnary | ( | ) |
Definition at line 115 of file expression.cpp.
◆ toVariable()
| VariableExpr * BaseExpr::toVariable | ( | ) |
Definition at line 118 of file expression.cpp.
◆ type()
|
virtual |
Reimplemented in KexiDB::VariableExpr.
Definition at line 78 of file expression.cpp.
◆ validate()
|
virtual |
Reimplemented in KexiDB::BinaryExpr, KexiDB::UnaryExpr, and KexiDB::VariableExpr.
Definition at line 88 of file expression.cpp.
Member Data Documentation
◆ m_cl
|
protected |
class
Definition at line 123 of file expression.h.
◆ m_par
|
protected |
parent expression
Definition at line 124 of file expression.h.
◆ m_token
|
protected |
Definition at line 125 of file expression.h.
The documentation for this class was generated from the following files:
