|
Krita Source Code Documentation
|
#include <EnhancedPathFormula.h>
Public Types | |
| enum | Operator { OperatorInvalid , OperatorAdd , OperatorSub , OperatorMul , OperatorDiv , OperatorLeftPar , OperatorRightPar , OperatorComma } |
| operator types More... | |
| enum | Type { TypeUnknown = 0 , TypeNumber , TypeOperator , TypeReference , TypeFunction } |
| token types More... | |
Public Member Functions | |
| qreal | asNumber () const |
| Returns the token converted to qreal. | |
| Operator | asOperator () const |
| Returns the token as operator. | |
| FormulaToken (const FormulaToken &token) | |
| copy constructor | |
| FormulaToken (Type type=TypeUnknown, const QString &text=QString(), int position=-1) | |
| Constructs token with given type, text and position. | |
| bool | isFunction () const |
| Returns if token is a function. | |
| bool | isNumber () const |
| Returns if the token is a number. | |
| bool | isOperator () const |
| Returns if the token is a operator, OperatorInvalid if token is no operator. | |
| bool | isReference () const |
| Returns if token is a reference. | |
| FormulaToken & | operator= (const FormulaToken &token) |
| assignment operator | |
| int | position () const |
| Returns the position of the token. | |
| QString | text () const |
| Returns the text representation of the token. | |
| Type | type () const |
| Returns the type of the token. | |
Private Attributes | |
| int | m_position {-1} |
| the tokens position | |
| QString | m_text |
| the token text representation | |
| Type | m_type {TypeUnknown} |
| the token type | |
Definition at line 15 of file EnhancedPathFormula.h.
operator types
Definition at line 28 of file EnhancedPathFormula.h.
| enum FormulaToken::Type |
token types
Definition at line 19 of file EnhancedPathFormula.h.
|
explicit |
Constructs token with given type, text and position.
Definition at line 654 of file EnhancedPathFormula.cpp.
| FormulaToken::FormulaToken | ( | const FormulaToken & | token | ) |
copy constructor
Definition at line 659 of file EnhancedPathFormula.cpp.
| qreal FormulaToken::asNumber | ( | ) | const |
Returns the token converted to qreal.
Definition at line 679 of file EnhancedPathFormula.cpp.
References isNumber(), and m_text.
| FormulaToken::Operator FormulaToken::asOperator | ( | ) | const |
Returns the token as operator.
Definition at line 688 of file EnhancedPathFormula.cpp.
References isOperator(), m_text, matchOperator(), and OperatorInvalid.
|
inline |
Returns if token is a function.
Definition at line 75 of file EnhancedPathFormula.h.
References m_type, and TypeFunction.
|
inline |
Returns if the token is a number.
Definition at line 65 of file EnhancedPathFormula.h.
References m_type, and TypeNumber.
|
inline |
Returns if the token is a operator, OperatorInvalid if token is no operator.
Definition at line 70 of file EnhancedPathFormula.h.
References m_type, and TypeOperator.
|
inline |
Returns if token is a reference.
Definition at line 80 of file EnhancedPathFormula.h.
References m_type, and TypeReference.
| FormulaToken & FormulaToken::operator= | ( | const FormulaToken & | token | ) |
assignment operator
Definition at line 666 of file EnhancedPathFormula.cpp.
References m_position, m_text, and m_type.
|
inline |
Returns the position of the token.
Definition at line 59 of file EnhancedPathFormula.h.
References m_position.
|
inline |
Returns the text representation of the token.
Definition at line 54 of file EnhancedPathFormula.h.
References m_text.
|
inline |
Returns the type of the token.
Definition at line 49 of file EnhancedPathFormula.h.
References m_type.
|
private |
|
private |
the token text representation
Definition at line 91 of file EnhancedPathFormula.h.
|
private |