Version: 9.15.0
QtxEvalSetBase Class Reference

Generic class. Provides functionality for standard operations sets. More...

#include <QtxEvalExpr.h>

Inheritance diagram for QtxEvalSetBase:
Inheritance graph

Public Member Functions

 QtxEvalSetBase ()
 Constructor. More...
 
virtual ~QtxEvalSetBase ()
 Destructor. More...
 
virtual void operationList (QStringList &) const
 Get the list of possible operations. More...
 
virtual void bracketsList (QStringList &, bool open) const
 Get list of brackets. More...
 
virtual QtxEvalExpr::Error isValid (const QString &, const QVariant::Type, const QVariant::Type) const
 Check operation validity. More...
 
- Public Member Functions inherited from QtxEvalSet
 QtxEvalSet ()
 Constructor. More...
 
virtual ~QtxEvalSet ()
 Destructor. More...
 
virtual QString name () const =0
 Get unique operations set name. More...
 
virtual bool createValue (const QString &, QVariant &) const
 Create value from its string representation. More...
 
virtual int priority (const QString &, bool isBin) const =0
 Get the operation priority. More...
 
virtual QtxEvalExpr::Error calculate (const QString &, QVariant &, QVariant &) const =0
 Calculate the operation. More...
 

Protected Types

typedef QList< QVariant::Type > ListOfTypes
 

Protected Member Functions

void addTypes (const ListOfTypes &)
 Add operand types. More...
 
void addOperations (const QStringList &)
 Add operation names to the internal list of operations. More...
 

Private Attributes

QStringList myOpers
 
ListOfTypes myTypes
 

Detailed Description

Generic class. Provides functionality for standard operations sets.

Member Typedef Documentation

◆ ListOfTypes

typedef QList<QVariant::Type> QtxEvalSetBase::ListOfTypes
protected

Constructor & Destructor Documentation

◆ QtxEvalSetBase()

QtxEvalSetBase::QtxEvalSetBase ( )

Constructor.

◆ ~QtxEvalSetBase()

QtxEvalSetBase::~QtxEvalSetBase ( )
virtual

Destructor.

Member Function Documentation

◆ addOperations()

void QtxEvalSetBase::addOperations ( const QStringList &  list)
protected

Add operation names to the internal list of operations.

Parameters
listoperations to be added

References myOpers.

◆ addTypes()

void QtxEvalSetBase::addTypes ( const ListOfTypes list)
protected

Add operand types.

Parameters
listoperand types to be added

References myTypes.

◆ bracketsList()

void QtxEvalSetBase::bracketsList ( QStringList &  list,
bool  open 
) const
virtual

Get list of brackets.

Parameters
listreturning list of brackets
openif true, collect opening brackets, or closing brackets otherwise

Implements QtxEvalSet.

Reimplemented in QtxEvalSetSets.

◆ isValid()

QtxEvalExpr::Error QtxEvalSetBase::isValid ( const QString &  op,
const QVariant::Type  t1,
const QVariant::Type  t2 
) const
virtual

Check operation validity.

If the operation is valid, QtxEvalExpr::OK is returned. If types of operands are invalid, the function returns QtxEvalExpr::OperandsNotMatch or QtxEvalExpr::InvalidOperation.

Parameters
opoperation
t1first operand type
t2second operand type
Returns
error code (QtxEvalExpr::Error)

Implements QtxEvalSet.

Reimplemented in QtxEvalSetSets.

References QtxEvalExpr::InvalidOperation, myTypes, QtxEvalExpr::OK, QtxEvalExpr::OperandsNotMatch, and QtxEvalSet::priority().

◆ operationList()

void QtxEvalSetBase::operationList ( QStringList &  list) const
virtual

Get the list of possible operations.

Parameters
listreturning list of operations supported by the class

Implements QtxEvalSet.

References myOpers.

Member Data Documentation

◆ myOpers

QStringList QtxEvalSetBase::myOpers
private

◆ myTypes

ListOfTypes QtxEvalSetBase::myTypes
private

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