Qt 4.8
|
Base class for classes that performs arithmetic operations between atomic values. More...
#include <qatomicmathematician_p.h>
Public Types | |
enum | Operator { Div = 1, IDiv = 2, Substract = 4, Mod = 8, Multiply = 16, Add = 32 } |
typedef QFlags< Operator > | Operators |
typedef QExplicitlySharedDataPointer< AtomicMathematician > | Ptr |
Public Types inherited from QPatternist::AtomicTypeVisitorResult | |
typedef QExplicitlySharedDataPointer< AtomicTypeVisitorResult > | Ptr |
Public Functions | |
virtual Item | calculate (const Item &operand1, const Operator op, const Item &operand2, const QExplicitlySharedDataPointer< DynamicContext > &context) const =0 |
virtual | ~AtomicMathematician () |
Public Functions inherited from QPatternist::AtomicTypeVisitorResult | |
AtomicTypeVisitorResult () | |
virtual | ~AtomicTypeVisitorResult () |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Static Public Functions | |
static QString | displayName (const AtomicMathematician::Operator op) |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Base class for classes that performs arithmetic operations between atomic values.
Definition at line 73 of file qatomicmathematician_p.h.
Definition at line 119 of file qatomicmathematician_p.h.
Definition at line 78 of file qatomicmathematician_p.h.
Enumerator | |
---|---|
Div | |
IDiv | |
Substract | |
Mod | |
Multiply | |
Add |
Definition at line 80 of file qatomicmathematician_p.h.
|
virtual |
Definition at line 48 of file qatomicmathematician.cpp.
|
pure virtual |
Implemented in QPatternist::AbstractDateTimeMathematician, QPatternist::DateTimeDurationMathematician, QPatternist::OperandSwitcherMathematician, QPatternist::DurationDurationMathematician, QPatternist::DurationDurationDivisor, QPatternist::DurationNumericMathematician, QPatternist::IntegerMathematician, QPatternist::DecimalMathematician, and QPatternist::AbstractFloatMathematician< isDouble >.
Referenced by QPatternist::OperandSwitcherMathematician::calculate(), and QPatternist::ArithmeticExpression::flexiblyCalculate().
|
static |
Definition at line 52 of file qatomicmathematician.cpp.
Referenced by QPatternist::ArithmeticExpression::fetchMathematician().