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


Ignore:
Timestamp:
Nov 14, 2011, 5:18:56 PM (14 years ago)
Author:
ansari
Message:

1/ Corrections dans commander.cc des bugs de forinfile et boucles imbriquees
2/ Différentiation instruction break et breakall - gestion correcte des if
lors de la sortie de boucle. Reza 14/11/2011

File:
1 edited

Legend:

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

    r3572 r4034  
    9797  virtual string&       GetUsage(const string& kw);
    9898
    99   inline  void          SetMaxLoopLimit(int_8 lim=0) { maxlooplimit = lim; }
    100   inline  int_8         GetMaxLoopLimit() { return maxlooplimit; }
     99  inline  void          SetMaxLoopLimit(int_8 lim=0) { maxlooplimit_ = lim; }
     100  inline  int_8         GetMaxLoopLimit() { return maxlooplimit_; }
    101101
    102102  string                GetCurrentPrompt() { return curprompt; }
     
    147147  int           EvaluateTest(vector<string> & args,
    148148                             string & line, bool & res);
    149   int           EvalRPNExpr(vector<string> & args, string & line);
    150149
    151150  // variable de l'interpreteur = valeur - accepte la syntaxe de type varname[index]
     
    166165  virtual void  ShowMessage(const char * msg, int att);
    167166
    168   void          PushStack(vector<string> & args);
     167  void          PushStack(vector<string> * pargs);
     168  inline void   PushStack() { PushStack(NULL);  return; }
     169  inline void   PushStack(vector<string> & args) { PushStack(&args);  return; }
    169170  void          PopStack(bool psta=true);
    170171
     
    229230  // Gestion des blocs de commandes et tests (if)
    230231  stack< CommanderBloc * > CmdBlks;  // Bloc de commande courant (foreach, ...)
    231   int felevel;                    // foreach-for level
    232   int_8 maxlooplimit;            // Limite maximum des boucles
    233   stack< list<char> > TestsStack; // Stack des resultats de test
    234   list<char>::iterator tresit;       // Test courant
    235   bool curtestresult;             // Resultat courant des tests
     232  int felevel_;                    // foreach-for level
     233  int_8 maxlooplimit_;            // Limite maximum des boucles
     234  /*! \cond   Pour supprimer la documentation par doxygen */
     235  typedef struct {list<char> tstlist; list<char>::iterator tstresit; bool tstcurres; } TstStatus;
     236  /*! \endcond */
     237  stack< TstStatus > TestsStack; // Stack des resultats de test
     238  list<char>::iterator tresit_;       // Test courant
     239  bool curtestresult_;             // Resultat courant des tests
    236240
    237241  // Controle du flot d'execution
Note: See TracChangeset for help on using the changeset viewer.