kexi

KexiDB::BaseExpr Class Reference

#include <expression.h>

Inheritance diagram for KexiDB::BaseExpr:

KexiDB::BinaryExpr KexiDB::ConstExpr KexiDB::FunctionExpr KexiDB::NArgExpr KexiDB::UnaryExpr KexiDB::VariableExpr KexiDB::QueryParameterExpr List of all members.

Detailed Description

A base class for all expressions.

Definition at line 62 of file expression.h.


Public Types

typedef QPtrList< BaseExpr > List
typedef QPtrListIterator<
BaseExpr > 
ListIterator

Public Member Functions

 BaseExpr (int token)
virtual ~BaseExpr ()
int token () const
virtual Field::Type type ()
BaseExpr * parent () const
virtual void setParent (BaseExpr *p)
virtual bool validate (ParseInfo &parseInfo)
virtual QString toString (QuerySchemaParameterValueListIterator *params=0)=0
virtual void getQueryParameters (QuerySchemaParameterList &params)=0
void debug ()
virtual QString debugString ()
QString tokenToDebugString ()
virtual QString tokenToString ()
int exprClass () const
NArgExpr * toNArg ()
UnaryExpr * toUnary ()
BinaryExpr * toBinary ()
ConstExpr * toConst ()
VariableExpr * toVariable ()
FunctionExpr * toFunction ()
QueryParameterExpr * toQueryParameter ()

Static Public Member Functions

static QString tokenToDebugString (int token)

Protected Attributes

int m_cl
BaseExpr * m_par
int m_token

Member Function Documentation

virtual QString KexiDB::BaseExpr::toString ( QuerySchemaParameterValueListIterator *  params = 0  )  [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::NArgExpr, KexiDB::UnaryExpr, KexiDB::BinaryExpr, KexiDB::ConstExpr, KexiDB::QueryParameterExpr, KexiDB::VariableExpr, and KexiDB::FunctionExpr.

virtual void KexiDB::BaseExpr::getQueryParameters ( QuerySchemaParameterList &  params  )  [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::NArgExpr, KexiDB::UnaryExpr, KexiDB::BinaryExpr, KexiDB::ConstExpr, KexiDB::QueryParameterExpr, KexiDB::VariableExpr, and KexiDB::FunctionExpr.

QString KexiDB::BaseExpr::tokenToDebugString (  )  [inline]

Returns:
single character if the token is < 256 or token name, e.g. LESS_OR_EQUAL (for debugging).

Definition at line 96 of file expression.h.

QString BaseExpr::tokenToString (  )  [virtual]

Returns:
string for token, like "<=" or ">"

Reimplemented in KexiDB::BinaryExpr.

Definition at line 108 of file expression.cpp.

NArgExpr * BaseExpr::toNArg (  ) 

Convenience type casts.

Definition at line 115 of file expression.cpp.


Member Data Documentation

int KexiDB::BaseExpr::m_cl [protected]

class

Definition at line 115 of file expression.h.

parent expression

Definition at line 116 of file expression.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys