Representation of data for the Parser class.
More...
#include <Parser.h>
Representation of data for the Parser class.
- See also
- =
Definition at line 38 of file Parser.h.
◆ Parser() [1/3]
Initialises the parser with the string "0": serves no purpose!!
Definition at line 25 of file Parser.cpp.
◆ Parser() [2/3]
| Parser::Parser |
( |
const Parser & | p | ) |
|
◆ ~Parser()
◆ Parser() [3/3]
| Parser::Parser |
( |
std::string & | s, |
|
|
int | n = 1 ) |
Constructs a Parser object with a specified string and a maximum number of variables to be indicated with the addVar method.
Definition at line 40 of file Parser.cpp.
◆ addCst()
◆ addVar()
| void Parser::addVar |
( |
const char * | vv | ) |
|
Allows adding a variable by specifying its representative string (e.g.: x, y1, etc.)
Definition at line 565 of file Parser.cpp.
◆ eval() [1/2]
Used to evaluate the mathematical expression corresponding to the character string. To do so, the tree must first be built using the parseString() method.
Definition at line 68 of file Parser.h.
◆ eval() [2/2]
| double Parser::eval |
( |
const PNodePod & | node | ) |
|
|
inlineprotected |
◆ evalFunc()
| KOKKOS_INLINE_FUNCTION double Parser::evalFunc |
( |
const PNodePod & | node, |
|
|
double | x ) |
|
protected |
◆ evalOp()
| KOKKOS_INLINE_FUNCTION double Parser::evalOp |
( |
const PNodePod & | node, |
|
|
double | x, |
|
|
double | y ) |
|
protected |
◆ getmaxVar()
| int Parser::getmaxVar |
( |
| ) |
|
|
inline |
◆ getNbVar()
◆ getString()
| std::string & Parser::getString |
( |
| ) |
|
|
inline |
◆ init_parser()
| void Parser::init_parser |
( |
| ) |
|
◆ LIST()
◆ parserState0()
◆ parserState1()
◆ parserState2()
◆ parseString()
| void Parser::parseString |
( |
| ) |
|
|
virtual |
Builds the tree corresponding to the character string. This tree must be built once and the string is evaluated by traversing this tree via the eval() method as many times as desired.
Reimplemented in ParserView.
Definition at line 124 of file Parser.cpp.
◆ precedence()
| int Parser::precedence |
( |
int | op | ) |
|
|
staticprotected |
◆ searchCst()
| int Parser::searchCst |
( |
const std::string & | v | ) |
|
|
protected |
◆ searchFunc()
| int Parser::searchFunc |
( |
const std::string & | v | ) |
|
|
protected |
◆ searchVar() [1/2]
| int Parser::searchVar |
( |
const char * | sv | ) |
|
|
inlineprotected |
◆ searchVar() [2/2]
| int Parser::searchVar |
( |
const std::string & | s | ) |
|
|
inlineprotected |
◆ set()
| void Parser::set |
( |
const Parser & | p | ) |
|
◆ setImpulsion()
| void Parser::setImpulsion |
( |
double | tinit, |
|
|
double | periode ) |
|
inline |
Sets the initial time and period of the impulse function.
Definition at line 111 of file Parser.h.
◆ setNbVar()
| void Parser::setNbVar |
( |
int | nvar | ) |
|
|
virtual |
Sets the maximum number of variables to be specified with the addVar method.
Definition at line 116 of file Parser.cpp.
◆ setString()
| void Parser::setString |
( |
const std::string & | s | ) |
|
|
inline |
◆ setVar() [1/3]
| void Parser::setVar |
( |
const char * | sv, |
|
|
double | val ) |
|
inline |
Sets the value of the variable represented by the string sv.
Definition at line 73 of file Parser.h.
◆ setVar() [2/3]
| void Parser::setVar |
( |
const std::string & | v, |
|
|
double | val ) |
|
inline |
Sets the value of the variable represented by v.
Definition at line 78 of file Parser.h.
◆ setVar() [3/3]
| void Parser::setVar |
( |
int | i, |
|
|
double | val ) |
|
inline |
Sets the value of the variable with the specified number. This number corresponds to the order in which variables were added via the addVar() method.
Definition at line 83 of file Parser.h.
◆ test_op_binaire()
| int Parser::test_op_binaire |
( |
int | type | ) |
|
|
protected |
◆ c_pi
◆ impuls_T
◆ impuls_t0
◆ impuls_tempo
| double Parser::impuls_tempo |
|
protected |
◆ impuls_tn
◆ ivar
◆ les_var
| ArrOfDouble Parser::les_var |
|
protected |
◆ les_var_names
| Noms Parser::les_var_names |
|
protected |
◆ map_function_
| std::map<std::string, int> Parser::map_function_ |
|
protected |
◆ maxvar
◆ PNodes
◆ root
◆ state
◆ str
The documentation for this class was generated from the following files:
- /home/docs/trust-code/src/Kernel/Math/Parser.h
- /home/docs/trust-code/src/Kernel/Math/Parser.cpp