Changeset 2518 in Sophya for trunk/SophyaLib/SysTools/commander.h


Ignore:
Timestamp:
Mar 18, 2004, 7:15:19 PM (22 years ago)
Author:
ansari
Message:

Suite (presque finie) des modifications de l'interpreteur - gestion des variables en particulier - Reste au moins un bug ds CExpressionEvaluator - Reza 18/03/2004

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/commander.h

    r2483 r2518  
    9191  inline  CmdInterpreter* CurrentInterpreter() { return(curcmdi); }
    9292
    93   //   Utilitaire pour decoupage en mot
    94   static  int   LineToWords(string& line, string& kw, vector<string>& tokens,
    95                             string& toks, bool uq=true);
    96 protected:
    97   virtual int   ParseLineExecute(string& line, bool qw=true);
    98 
    99   virtual int   ExecuteCommandLine(string & keyw, vector<string> & args,
    100                                    string & toks);
    101 
    102   virtual bool  CheckHelpGrp(string& grp, int& gid, string& desc);
    103   inline  bool  CheckHelpGrp(string& grp, int& gid)
    104   { string desc=""; return CheckHelpGrp(grp, gid, desc); }
    105 
    106   virtual int   SubstituteVars(string & s, string & s2); 
    107   int           EvaluateTest(vector<string> & args,
    108                              string & line, bool & res);
    109   int           EvalRPNExpr(vector<string> & args, string & line);
    110 
    111   // Acces aux variables
    112   virtual bool    Var2Str(string const & vn, string & vv);
    113   inline  bool    Var2Str(string const & vn, int idx, string & vv)
    114   { return GetVar(vn, idx, vv); }
    115   inline  bool    Var2Str(string const & vn, vector<string> & vv)
    116   { return GetVar(vn, vv); }
    117 
    11893  // ----- Action / gestion des variables propres de l'interpreteur
    11994  // Verifie l'existence de la variable nomme vn et retourne sa valeur ds vv
    12095  // Retourne false si la variable n'existe pas
    121   virtual bool    SetVariable(string const & vn, string const & vv);
    12296  virtual bool    GetVar(string const & vn, string & vv);
    12397  virtual bool    GetVar(string const & vn, int idx, string & vv);
     
    140114  virtual void    ListVarEnv();
    141115
     116  //   Utilitaire pour decoupage en mot
     117  static  int   LineToWords(string& line, string& kw, vector<string>& tokens,
     118                            vector<bool>& qottoks, string& toks, bool uq=true);
     119protected:
     120  virtual int   ParseLineExecute(string& line, bool qw=true);
     121
     122  virtual int   ExecuteCommandLine(string & keyw, vector<string> & args,
     123                                   string & toks);
     124
     125  virtual bool  CheckHelpGrp(string& grp, int& gid, string& desc);
     126  inline  bool  CheckHelpGrp(string& grp, int& gid)
     127  { string desc=""; return CheckHelpGrp(grp, gid, desc); }
     128
     129  virtual int   SubstituteVars(string & s, string & s2); 
     130  int           EvaluateTest(vector<string> & args,
     131                             string & line, bool & res);
     132  int           EvalRPNExpr(vector<string> & args, string & line);
     133
     134  // variable de l'interpreteur = valeur - accepte la syntaxe de type varname[index]
     135  virtual bool    SetVariable(string const & vn, string const & vv);
     136  // Acces aux variables
     137  virtual bool    Var2Str(string const & vn, string & vv);
     138  inline  bool    Var2Str(string const & vn, int idx, string & vv)
     139  { return GetVar(vn, idx, vv); }
     140  inline  bool    Var2Str(string const & vn, vector<string> & vv)
     141  { return GetVar(vn, vv); }
     142
    142143  virtual string  GetTmpDir();
    143144
     
    202203  bool curtestresult;             // Resultat courant des tests
    203204
     205  // Controle du flot d'execution
     206  bool fgexebrk;
     207
    204208  // Commande splitees sur plusieurs lignes
    205209  bool mulinefg;            // Bloc multi-lignes (ligne suite)
Note: See TracChangeset for help on using the changeset viewer.