Parser#
#include <Parser.h>
Representation des donnees de la classe Parser .
How to cite this class in this doc#
:ref:`Parser <class-parser>`
[Parser](#class-parser)
Detailed description#
Inherited by#
public : ParserView
List of Public Methods#
List of Protected Methods#
List of Protected Static Methods#
Complete Member Function Documentation#
void Parser::addCst(const Constante &cst)
References
Referenced By
How to cite in this doc:
:ref:`void Parser::addCst(const Constante &cst) <public-void-parser-addcst-const-constante-ref-cst>`
[void Parser::addCst(const Constante &cst)](#public-void-parser-addcst-const-constante-ref-cst)
void Parser::addVar(const char *)
permet d’ajouter une variable en specifiant sa chaine representative (par ex. : x, y1 etc…)
References
Referenced By
How to cite in this doc:
:ref:`void Parser::addVar(const char *) <public-void-parser-addvar-const-char-ptr>`
[void Parser::addVar(const char *)](#public-void-parser-addvar-const-char-ptr)
double Parser::eval()
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 cite in this doc:
:ref:`double Parser::eval() <public-double-parser-eval>`
[double Parser::eval()](#public-double-parser-eval)
int Parser::getmaxVar()
References
Referenced By
How to cite in this doc:
:ref:`int Parser::getmaxVar() <public-int-parser-getmaxvar>`
[int Parser::getmaxVar()](#public-int-parser-getmaxvar)
int Parser::getNbVar()
References
Referenced By
How to cite in this doc:
:ref:`int Parser::getNbVar() <public-int-parser-getnbvar>`
[int Parser::getNbVar()](#public-int-parser-getnbvar)
std::string & Parser::getString()
References
Referenced By
How to cite in this doc:
:ref:`std::string & Parser::getString() <public-std-string-ref-parser-getstring>`
[std::string & Parser::getString()](#public-std-string-ref-parser-getstring)
void Parser::init_parser()
References
Referenced By
How to cite in this doc:
:ref:`void Parser::init_parser() <public-void-parser-init-parser>`
[void Parser::init_parser()](#public-void-parser-init-parser)
Parser::Parser()
Initialise le parser avec une chaine “0” : ne sert a rien !!
References
How to cite in this doc:
:ref:`Parser::Parser() <public-parser-parser>`
[Parser::Parser()](#public-parser-parser)
Parser::Parser(const Parser &)
References
How to cite in this doc:
:ref:`Parser::Parser(const Parser &) <public-parser-parser-const-parser-ref>`
[Parser::Parser(const Parser &)](#public-parser-parser-const-parser-ref)
Parser::Parser(std::string &, int n=1)
Construit un objet Parser avec une chaine specifiee et un nb max de variables a indiquer avec la methode addVar.
References
How to cite in this doc:
:ref:`Parser::Parser(std::string &, int n=1) <public-parser-parser-std-string-ref-int-n-equal-1>`
[Parser::Parser(std::string &, int n=1)](#public-parser-parser-std-string-ref-int-n-equal-1)
void Parser::parseString()
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 cite in this doc:
:ref:`void Parser::parseString() <public-void-parser-parsestring>`
[void Parser::parseString()](#public-void-parser-parsestring)
void Parser::setImpulsion(double tinit, double periode)
Fixe le temps initial et la periode de la fonction impulsion
References
Referenced By
How to cite in this doc:
:ref:`void Parser::setImpulsion(double tinit, double periode) <public-void-parser-setimpulsion-double-tinit-double-periode>`
[void Parser::setImpulsion(double tinit, double periode)](#public-void-parser-setimpulsion-double-tinit-double-periode)
void Parser::setNbVar(int nvar)
Fixe le nombre max de variables a indiquer avec la methode addVar.
References
Referenced By
How to cite in this doc:
:ref:`void Parser::setNbVar(int nvar) <public-void-parser-setnbvar-int-nvar>`
[void Parser::setNbVar(int nvar)](#public-void-parser-setnbvar-int-nvar)
void Parser::setString(const std::string &s)
References
Referenced By
How to cite in this doc:
:ref:`void Parser::setString(const std::string &s) <public-void-parser-setstring-const-std-string-ref-s>`
[void Parser::setString(const std::string &s)](#public-void-parser-setstring-const-std-string-ref-s)
void Parser::setVar(const char *sv, double val)
Fixe la valeur de la variable representee par une chaine sv.
How to cite in this doc:
:ref:`void Parser::setVar(const char *sv, double val) <public-void-parser-setvar-const-char-ptr-sv-double-val>`
[void Parser::setVar(const char *sv, double val)](#public-void-parser-setvar-const-char-ptr-sv-double-val)
void Parser::setVar(const std::string &v, double val)
Fixe la valeur de la variable representee par v.
Referenced By
How to cite in this doc:
:ref:`void Parser::setVar(const std::string &v, double val) <public-void-parser-setvar-const-std-string-ref-v-double-val>`
[void Parser::setVar(const std::string &v, double val)](#public-void-parser-setvar-const-std-string-ref-v-double-val)
void Parser::setVar(int i, double val)
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 cite in this doc:
:ref:`void Parser::setVar(int i, double val) <public-void-parser-setvar-int-i-double-val>`
[void Parser::setVar(int i, double val)](#public-void-parser-setvar-int-i-double-val)
double Parser::eval(const PNodePod &node)
References
How to cite in this doc:
:ref:`double Parser::eval(const PNodePod &node) <protected-double-parser-eval-const-pnodepod-ref-node>`
[double Parser::eval(const PNodePod &node)](#protected-double-parser-eval-const-pnodepod-ref-node)
KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x)
References
Referenced By
How to cite in this doc:
:ref:`KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x) <protected-kokkos-inline-function-double-parser-evalfunc-const-pnodepod-ref-node-double-x>`
[KOKKOS_INLINE_FUNCTION double Parser::evalFunc(const PNodePod &node, double x)](#protected-kokkos-inline-function-double-parser-evalfunc-const-pnodepod-ref-node-double-x)
KOKKOS_INLINE_FUNCTION double Parser::evalOp(const PNodePod &node, double x, double y)
References
Referenced By
How to cite in this doc:
:ref:`KOKKOS_INLINE_FUNCTION double Parser::evalOp(const PNodePod &node, double x, double y) <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)](#protected-kokkos-inline-function-double-parser-evalop-const-pnodepod-ref-node-double-x-double-y)
void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *)
References
Referenced By
How to cite in this doc:
:ref:`void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *) <protected-void-parser-parserstate0-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr>`
[void Parser::parserState0(StringTokenizer *, pstackPNode *, stackint *)](#protected-void-parser-parserstate0-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr)
void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *)
References
Referenced By
How to cite in this doc:
:ref:`void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *) <protected-void-parser-parserstate1-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr>`
[void Parser::parserState1(StringTokenizer *, pstackPNode *, stackint *)](#protected-void-parser-parserstate1-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr)
void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *)
References
Referenced By
How to cite in this doc:
:ref:`void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *) <protected-void-parser-parserstate2-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr>`
[void Parser::parserState2(StringTokenizer *, pstackPNode *, stackint *)](#protected-void-parser-parserstate2-stringtokenizer-ptr-pstackpnode-ptr-stackint-ptr)
int Parser::searchCst(const std::string &v)
References
Referenced By
How to cite in this doc:
:ref:`int Parser::searchCst(const std::string &v) <protected-int-parser-searchcst-const-std-string-ref-v>`
[int Parser::searchCst(const std::string &v)](#protected-int-parser-searchcst-const-std-string-ref-v)
int Parser::searchFunc(const std::string &v)
References
Referenced By
How to cite in this doc:
:ref:`int Parser::searchFunc(const std::string &v) <protected-int-parser-searchfunc-const-std-string-ref-v>`
[int Parser::searchFunc(const std::string &v)](#protected-int-parser-searchfunc-const-std-string-ref-v)
int Parser::searchVar(const char *)
References
How to cite in this doc:
:ref:`int Parser::searchVar(const char *) <protected-int-parser-searchvar-const-char-ptr>`
[int Parser::searchVar(const char *)](#protected-int-parser-searchvar-const-char-ptr)
int Parser::searchVar(const std::string &s)
References
Referenced By
How to cite in this doc:
:ref:`int Parser::searchVar(const std::string &s) <protected-int-parser-searchvar-const-std-string-ref-s>`
[int Parser::searchVar(const std::string &s)](#protected-int-parser-searchvar-const-std-string-ref-s)
int Parser::test_op_binaire(int type)
References
Referenced By
How to cite in this doc:
:ref:`int Parser::test_op_binaire(int type) <protected-int-parser-test-op-binaire-int-type>`
[int Parser::test_op_binaire(int type)](#protected-int-parser-test-op-binaire-int-type)
int Parser::precedence(int)
References
Referenced By
How to cite in this doc:
:ref:`int Parser::precedence(int) <protected-static-int-parser-precedence-int>`
[int Parser::precedence(int)](#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