Parser#

#include <Parser.h>
Brief description

Representation des donnees de la classe Parser .

How to reference this class#

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Parser <class-parser>`
[Parser](#class-parser)

Detailed description#

Inherited by#

Inheritance graph#

If the image is too small, right-click and open in new tab

../../../../../_images/classParser__inherit__graph.png

List of Public Methods#

List of Protected Methods#

List of Protected Static Methods#

Complete Member Function Documentation#

addCst#

Definition
void Parser::addCst(const Constante &cst)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::addCst(const Constante &cst) <parser-public-void-parser-addcst-const-constante-ref-cst>`
[void Parser::addCst(const Constante &cst)](#parser-public-void-parser-addcst-const-constante-ref-cst)

addVar#

Definition
void Parser::addVar(const char *)
Brief description
Detailed description

permet d’ajouter une variable en specifiant sa chaine representative (par ex. : x, y1 etc…)

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::addVar(const char *) <parser-public-void-parser-addvar-const-char-ptr>`
[void Parser::addVar(const char *)](#parser-public-void-parser-addvar-const-char-ptr)

eval#

Definition
double Parser::eval()
Brief description
Detailed description

Sert a evaluer l’expression mathematique correspondante a la chaine de caracteres. Poru cela il faut avant toute chose construire l’arbre par la methode parseString() .

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`double Parser::eval() <parser-public-double-parser-eval>`
[double Parser::eval()](#parser-public-double-parser-eval)

getmaxVar#

Definition
int Parser::getmaxVar()
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::getmaxVar() <parser-public-int-parser-getmaxvar>`
[int Parser::getmaxVar()](#parser-public-int-parser-getmaxvar)

getNbVar#

Definition
int Parser::getNbVar()
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::getNbVar() <parser-public-int-parser-getnbvar>`
[int Parser::getNbVar()](#parser-public-int-parser-getnbvar)

getString#

Definition
std::string & Parser::getString()
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`std::string & Parser::getString() <parser-public-std-string-ref-parser-getstring>`
[std::string & Parser::getString()](#parser-public-std-string-ref-parser-getstring)

init_parser#

Definition
void Parser::init_parser()
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::init_parser() <parser-public-void-parser-init-parser>`
[void Parser::init_parser()](#parser-public-void-parser-init-parser)

Parser#

Definition
Parser::Parser()
Brief description
Detailed description

Initialise le parser avec une chaine “0” : ne sert a rien !!

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Parser::Parser() <parser-public-parser-parser>`
[Parser::Parser()](#parser-public-parser-parser)

Parser#

Definition
Parser::Parser(const Parser &)
Brief description
Detailed description
References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Parser::Parser(const Parser &) <parser-public-parser-parser-const-parser-ref>`
[Parser::Parser(const Parser &)](#parser-public-parser-parser-const-parser-ref)

Parser#

Definition
Parser::Parser(std::string &, int n=1)
Brief description
Detailed description

Construit un objet Parser avec une chaine specifiee et un nb max de variables a indiquer avec la methode addVar.

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Parser::Parser(std::string &, int n=1) <parser-public-parser-parser-std-string-ref-int-n-equal-1>`
[Parser::Parser(std::string &, int n=1)](#parser-public-parser-parser-std-string-ref-int-n-equal-1)

parseString#

Definition
void Parser::parseString()
Brief description
Detailed description

Construit l’arbre correspondant a la chaine de caracteres. Cet arbre doit etre construit une seule fois et la chaine de caractere est evaluee en parcourant cet arbre par la methode eval() autant de fois qu’on le souhaite.

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::parseString() <parser-public-void-parser-parsestring>`
[void Parser::parseString()](#parser-public-void-parser-parsestring)

setImpulsion#

Definition
void Parser::setImpulsion(double tinit, double periode)
Brief description
Detailed description

Fixe le temps initial et la periode de la fonction impulsion

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::setImpulsion(double tinit, double periode) <parser-public-void-parser-setimpulsion-double-tinit-double-periode>`
[void Parser::setImpulsion(double tinit, double periode)](#parser-public-void-parser-setimpulsion-double-tinit-double-periode)

setNbVar#

Definition
void Parser::setNbVar(int nvar)
Brief description
Detailed description

Fixe le nombre max de variables a indiquer avec la methode addVar.

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::setNbVar(int nvar) <parser-public-void-parser-setnbvar-int-nvar>`
[void Parser::setNbVar(int nvar)](#parser-public-void-parser-setnbvar-int-nvar)

setString#

Definition
void Parser::setString(const std::string &s)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::setString(const std::string &s) <parser-public-void-parser-setstring-const-std-string-ref-s>`
[void Parser::setString(const std::string &s)](#parser-public-void-parser-setstring-const-std-string-ref-s)

setVar#

Definition
void Parser::setVar(const char *sv, double val)
Brief description
Detailed description

Fixe la valeur de la variable representee par une chaine sv.

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::setVar(const char *sv, double val) <parser-public-void-parser-setvar-const-char-ptr-sv-double-val>`
[void Parser::setVar(const char *sv, double val)](#parser-public-void-parser-setvar-const-char-ptr-sv-double-val)

setVar#

Definition
void Parser::setVar(const std::string &v, double val)
Brief description
Detailed description

Fixe la valeur de la variable representee par v.

References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::setVar(const std::string &v, double val) <parser-public-void-parser-setvar-const-std-string-ref-v-double-val>`
[void Parser::setVar(const std::string &v, double val)](#parser-public-void-parser-setvar-const-std-string-ref-v-double-val)

setVar#

Definition
void Parser::setVar(int i, double val)
Brief description
Detailed description

Fixe la valeur de la variable de numero specifie. Ce numero correspondt a l’ordre de l’ajout des variables par la methode addVar() .

References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::setVar(int i, double val) <parser-public-void-parser-setvar-int-i-double-val>`
[void Parser::setVar(int i, double val)](#parser-public-void-parser-setvar-int-i-double-val)

~Parser#

Definition
Parser::~Parser()
Brief description
Detailed description
References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`Parser::~Parser() <parser-public-parser-dtor-parser>`
[Parser::~Parser()](#parser-public-parser-dtor-parser)

eval#

Definition
double Parser::eval(const PNodePod &node)
Brief description
Detailed description
References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`double Parser::eval(const PNodePod &node) <parser-protected-double-parser-eval-const-pnodepod-ref-node>`
[double Parser::eval(const PNodePod &node)](#parser-protected-double-parser-eval-const-pnodepod-ref-node)

evalFunc#

Definition
KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x) <parser-protected-kokkos-inline-function-double-parser-evalfunc-const-pnodepod-ref-node-double-x>`
[KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x)](#parser-protected-kokkos-inline-function-double-parser-evalfunc-const-pnodepod-ref-node-double-x)

evalOp#

Definition
KOKKOS_INLINE_FUNCTION double Parser::evalOp(const PNodePod &node, double x, double y)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`KOKKOS_INLINE_FUNCTION double Parser::evalOp(const PNodePod &node, double x, double y) <parser-protected-kokkos-inline-function-double-parser-evalop-const-pnodepod-ref-node-double-x-double-y>`
[KOKKOS_INLINE_FUNCTION double Parser::evalOp(const PNodePod &node, double x, double y)](#parser-protected-kokkos-inline-function-double-parser-evalop-const-pnodepod-ref-node-double-x-double-y)

parserState0#

Definition
void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *) <parser-protected-void-parser-parserstate0-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr>`
[void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *)](#parser-protected-void-parser-parserstate0-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr)

parserState1#

Definition
void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *) <parser-protected-void-parser-parserstate1-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr>`
[void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *)](#parser-protected-void-parser-parserstate1-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr)

parserState2#

Definition
void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *) <parser-protected-void-parser-parserstate2-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr>`
[void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *)](#parser-protected-void-parser-parserstate2-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr)

searchCst#

Definition
int Parser::searchCst(const std::string &v)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::searchCst(const std::string &v) <parser-protected-int-parser-searchcst-const-std-string-ref-v>`
[int Parser::searchCst(const std::string &v)](#parser-protected-int-parser-searchcst-const-std-string-ref-v)

searchFunc#

Definition
int Parser::searchFunc(const std::string &v)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::searchFunc(const std::string &v) <parser-protected-int-parser-searchfunc-const-std-string-ref-v>`
[int Parser::searchFunc(const std::string &v)](#parser-protected-int-parser-searchfunc-const-std-string-ref-v)

searchVar#

Definition
int Parser::searchVar(const char *)
Brief description
Detailed description
References
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::searchVar(const char *) <parser-protected-int-parser-searchvar-const-char-ptr>`
[int Parser::searchVar(const char *)](#parser-protected-int-parser-searchvar-const-char-ptr)

searchVar#

Definition
int Parser::searchVar(const std::string &s)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::searchVar(const std::string &s) <parser-protected-int-parser-searchvar-const-std-string-ref-s>`
[int Parser::searchVar(const std::string &s)](#parser-protected-int-parser-searchvar-const-std-string-ref-s)

test_op_binaire#

Definition
int Parser::test_op_binaire(int type)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::test_op_binaire(int type) <parser-protected-int-parser-test-op-binaire-int-type>`
[int Parser::test_op_binaire(int type)](#parser-protected-int-parser-test-op-binaire-int-type)

precedence#

Definition
int Parser::precedence(int)
Brief description
Detailed description
References
Referenced By
How to reference this method:

Copy the following pieces of RST/Markdown code to cite this element in other parts of the sphinx documentation (there is a copy button on the top-right when hovering the code block):

:ref:`int Parser::precedence(int) <parser-protected-static-int-parser-precedence-int>`
[int Parser::precedence(int)](#parser-protected-static-int-parser-precedence-int)

Attributes Documentation#

c_pi (protected)
Constante Parser::c_pi
impuls_T (protected)
double Parser::impuls_T
impuls_t0 (protected)
double Parser::impuls_t0
impuls_tempo (protected)
double Parser::impuls_tempo
impuls_tn (protected)
double Parser::impuls_tn
ivar (protected)
int Parser::ivar
les_cst (protected)
TRUST_List<Constante> Parser::les_cst
les_var (protected)
ArrOfDouble Parser::les_var
les_var_names (protected)
Noms Parser::les_var_names
map_function_ (protected)
std::map<std::string, int> Parser::map_function_
maxvar (protected)
int Parser::maxvar
PNodes (protected)
std::vector<PNodePod> Parser::PNodes
root (protected)
PNode* Parser::root
state (protected)
int Parser::state
str (protected)
std::string* Parser::str