Changeset 2229 in Sophya for trunk/SophyaPI/PIext/pintuple.cc


Ignore:
Timestamp:
Oct 24, 2002, 11:17:29 PM (23 years ago)
Author:
cmv
Message:

Gestion des options graph. cmv 24/10/02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pintuple.cc

    r2115 r2229  
    270270int PINTuple::DecodeOptionString(vector<string> & opt, bool rmdecopt)
    271271{
    272   if (opt.size() < 1)  return(0); 
     272  int optsz1 = opt.size();
     273  if(optsz1<1)  return(0); 
    273274  // On appelle d'abord le decodage de la classe PIDrawer de laquelle
    274275  // on herite. (Pas obligatoire) on decode donc ici les attributs de
    275276  // couleur, fontes ...
    276277  int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
    277   if ((opt.size() - ndec1) < 1) return(ndec1);  // si tout a ete decode
     278  if(optsz1-ndec1<1) return(ndec1);  // si tout a ete decode
    278279
    279280  vector<string> udopt;  // On gardera ici les options non decodees
     
    282283  for( k=0; k<opt.size(); k++ ) {
    283284    string opts = opt[k];
    284     if (opts == "stat")  SetStats(true);
    285     else if (opts == "nostat")  SetStats(false);
     285    if(opts=="sta" || opts=="stat" || opts=="stats") SetStats(true);
     286    else if(  opts=="nsta"   || opts=="nstat"
     287           || opts=="nostat" || opts=="nostats") SetStats(false);
    286288    else {
    287289      // Si option non decode
     
    306308void PINTuple::GetOptionsHelpInfo(string& info)
    307309{
    308   // On recupere d'abord la chaine info de la classe de base
    309   PIDrawer::GetOptionsHelpInfo(info);
    310   info += " ---- PINTuple options help info : \n" ;
    311   info += "    stat / nostat : activate/deactivate statistic information display \n";
    312   return;
    313 }
     310// On recupere d'abord la chaine info de la classe de base
     311PIDrawer::GetOptionsHelpInfo(info);
     312info += " ---- PINTuple options help info : \n" ;
     313info += "- sta,stat,stats:            activate   statistic display\n";
     314info += "  nsta,nstat,nostat,nostats: deactivate statistic display\n";
     315return;
     316}
Note: See TracChangeset for help on using the changeset viewer.