Derived from Entity, used for storing pointers to math functions.
More...
#include <pssmathparser.h>
|
| | Operator (const string &a_name, EntityType a_type=EntityType::Operator, OperatorPrecedence m_precedence=OperatorPrecedence::Function, double(*a_ddOperator)(const double)=nullptr, double(*a_dddOperator)(const double, const double)=nullptr, double(*a_ddiOperator)(const double, const int)=nullptr) |
| | Constructor, with constructor list only. More...
|
| |
| double | dddOperator (double a_arg1, double a_arg2) const |
| | Overload of the function call. More...
|
| |
| double | ddOperator (double a_arg1) const |
| | Overload of the function call. More...
|
| |
| uint16_t | precedence () const |
| | Return the operator precedence as unsigned int. More...
|
| |
| | Entity (const string &a_name, const EntityType a_type=EntityType::None) |
| | Constructor, just a constructor list. More...
|
| |
|
| ~Entity () |
| | Destructor.
|
| |
| const Entity * | getEntity () const |
| | Returns the pointer to the Entity object. More...
|
| |
| EntityType | entityType () const |
| | Get the EntityType of the object. More...
|
| |
Derived from Entity, used for storing pointers to math functions.
This class has pointer to functions that are standard math.h functions. These are called from the MathExpression during parsing. Several types are posible of these class.
- Note
- Example:
EntityType::OperatorInIntOutInt is a function of the type int function(int a_value)
| Operator::Operator |
( |
const string & |
a_name, |
|
|
EntityType |
a_type = EntityType::Operator, |
|
|
OperatorPrecedence |
a_precedence = OperatorPrecedence::Function, |
|
|
double(*)(const double) |
a_ddOperator = nullptr, |
|
|
double(*)(const double, const double) |
a_dddOperator = nullptr, |
|
|
double(*)(const double, const int) |
a_ddiOperator = nullptr |
|
) |
| |
Constructor, with constructor list only.
- Parameters
-
| a_name | Name key of the Operator, part of the Entity parent class |
| a_type | Type of the Operator, part of the Entity parent class |
| a_precedence | The OperatorPrecedence |
| double Operator::dddOperator |
( |
double |
a_arg1, |
|
|
double |
a_arg2 |
|
) |
| const |
Overload of the function call.
- Parameters
-
| a_arg1 | First argument |
| a_arg2 | Second argument |
- Returns
- double Return value from function(a_arg1, a_arg2)
| double Operator::ddOperator |
( |
double |
a_arg1 | ) |
const |
Overload of the function call.
- Parameters
-
- Returns
- double Return value from function(a_arg1)
| uint16_t Operator::precedence |
( |
| ) |
const |
Return the operator precedence as unsigned int.
We return the unsigned int in order to be able to compare two precedences.
- Returns
- uint16_t The cast of the OperatorPrecedence enum
| double(* PssMathParser::Operator::m_dddOperator)(const double, const double) |
|
private |
| double(* PssMathParser::Operator::m_ddiOperator)(const double, const int) |
|
private |
| double(* PssMathParser::Operator::m_ddOperator)(const double) |
|
private |
Higher number operates first
The documentation for this class was generated from the following files: