|
PssMathParser
1.0.0
Parser of mathemathical expressions
|
Derived from Entity, used for intermediate steps of calcualtion. More...
#include <pssmathparser.h>
Public Member Functions | |
| Generator (const string &a_name, EntityType a_entityType, const Operator *a_op=nullptr, const Argument *a_arg1=nullptr, const Argument *a_arg2=nullptr, Argument *a_myArg=nullptr) | |
| Constructor, only constructor list. More... | |
| double | generateDoubleValue () const |
| Returns double value generated with the generator's operator. More... | |
| const string & | getName () const |
| Getter of the generator name. More... | |
Public Member Functions inherited from PssMathParser::Entity | |
| 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... | |
Private Attributes | |
| const Operator * | m_op |
| const Argument * | m_arg1 |
| const Argument * | m_arg2 |
| Argument * | m_myArg |
Additional Inherited Members | |
Protected Attributes inherited from PssMathParser::Entity | |
| string | m_name |
| EntityType | m_type |
Derived from Entity, used for intermediate steps of calcualtion.
This class is connected to argument, its objects are not defined by the user but generated as intermediate steps (arguments) that are used for generating the value of other arguments. This class has pointers to the arguments and the operator wich is used for generating its value. The Generator class doesn't store a value because it supose to produce the value upon call. The connection between the Argument and the Generator that generates it is through its names.
| Generator::Generator | ( | const string & | a_name, |
| EntityType | a_entityType, | ||
| const Operator * | a_op = nullptr, |
||
| const Argument * | a_arg1 = nullptr, |
||
| const Argument * | a_arg2 = nullptr, |
||
| Argument * | a_myArg = nullptr |
||
| ) |
Constructor, only constructor list.
| double Generator::generateDoubleValue | ( | ) | const |
Returns double value generated with the generator's operator.
| const string & Generator::getName | ( | ) | const |
Getter of the generator name.
This is a name that also exists in the m_argumentMap. This name connects the generator and the argument which value is generated.
|
private |
Points to the first argument
|
private |
Points to the second argument
|
private |
Points to the generated argument
|
private |
Points to the operator of the genrator