Parser#
#include <Parser.h>
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#
public : ParserView
Inheritance graph#
If the image is too small, right-click and open in new tab
List of Public Methods#
List of Protected Methods#
List of Protected Static Methods#
Complete Member Function Documentation#
addCst#
void Parser::addCst(const Constante &cst)
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#
void Parser::addVar(const char *)
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#
double Parser::eval()
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() .
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#
int Parser::getmaxVar()
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#
int Parser::getNbVar()
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#
std::string & Parser::getString()
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#
void Parser::init_parser()
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#
Parser::Parser()
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#
Parser::Parser(const Parser &)
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#
Parser::Parser(std::string &, int n=1)
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#
void Parser::parseString()
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#
void Parser::setImpulsion(double tinit, double periode)
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#
void Parser::setNbVar(int nvar)
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#
void Parser::setString(const std::string &s)
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#
void Parser::setVar(const char *sv, double val)
Detailed description
Fixe la valeur de la variable representee par une chaine sv.
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#
void Parser::setVar(const std::string &v, double val)
Detailed description
Fixe la valeur de la variable representee par v.
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#
void Parser::setVar(int i, double val)
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() .
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#
Parser::~Parser()
Detailed description
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#
double Parser::eval(const PNodePod &node)
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#
KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x)
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#
KOKKOS_INLINE_FUNCTION double Parser::evalOp(const PNodePod &node, double x, double y)
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#
void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *)
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#
void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *)
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#
void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *)
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#
int Parser::searchCst(const std::string &v)
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#
int Parser::searchFunc(const std::string &v)
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#
int Parser::searchVar(const char *)
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#
int Parser::searchVar(const std::string &s)
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#
int Parser::test_op_binaire(int type)
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#
int Parser::precedence(int)
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#
Constante Parser::c_pi
double Parser::impuls_T
double Parser::impuls_t0
double Parser::impuls_tempo
double Parser::impuls_tn
int Parser::ivar
TRUST_List<Constante> Parser::les_cst
ArrOfDouble Parser::les_var
Noms Parser::les_var_names
std::map<std::string, int> Parser::map_function_
int Parser::maxvar
std::vector<PNodePod> Parser::PNodes
PNode* Parser::root
int Parser::state
std::string* Parser::str