Changeset 1268 in Sophya for trunk/SophyaPI/PIext/piacmd.cc
- Timestamp:
- Nov 1, 2000, 1:01:28 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/piacmd.cc
r1265 r1268 553 553 return(99); 554 554 } 555 // Sans substitution des variables $ 556 if (s[1] == '@') return(cxxe->ExecuteCxx(s.substr(2))); 557 else { // Avec substitution de variables $ 555 string localkey = "c++exec", localstr; 556 vector<string> localtokens; 557 if (s[1] == '@') { // Sans substitution des variables $ 558 localstr = s.substr(2); 559 localtokens.push_back(localstr); 560 return(cxxe->Execute(localkey,localtokens,localstr)); 561 } else { // Avec substitution de variables $ 558 562 string s2; 559 563 SubstituteVars(s, s2); 560 return(cxxe->ExecuteCxx(s2.substr(1))); 564 localstr = s2.substr(1); 565 localtokens.push_back(localstr); 566 return(cxxe->Execute(localkey,localtokens,localstr)); 561 567 } 562 568 } … … 820 826 // Execution d'une commande enregistree 821 827 // CMV c'est ici qu'il faut passer la string 822 else rc = ExecuteCommand(kw, tokens );828 else rc = ExecuteCommand(kw, tokens, toks); 823 829 824 830 if (timing) gltimer->Split(); … … 853 859 } 854 860 855 return(ExecuteCommand(kw, tokens ));856 } 857 858 /* --Methode-- */ 859 int PIACmd::ExecuteCommand(string& keyw, vector<string>& args )861 return(ExecuteCommand(kw, tokens, toks)); 862 } 863 864 /* --Methode-- */ 865 int PIACmd::ExecuteCommand(string& keyw, vector<string>& args, string& toks) 860 866 { 861 867 int rc = -1; … … 863 869 if (it == cmdexmap.end()) cout << "No such command : " << keyw << " ! " << endl; 864 870 else { 865 if ((*it).second.cex) rc = (*it).second.cex->Execute(keyw, args );871 if ((*it).second.cex) rc = (*it).second.cex->Execute(keyw, args, toks); 866 872 else cout << "Dont know how to execute " << keyw << " ? " << endl; 867 873 }
Note:
See TracChangeset
for help on using the changeset viewer.