Changeset 2229 in Sophya for trunk/SophyaPI/PIext/pintuple.cc
- Timestamp:
- Oct 24, 2002, 11:17:29 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintuple.cc
r2115 r2229 270 270 int PINTuple::DecodeOptionString(vector<string> & opt, bool rmdecopt) 271 271 { 272 if (opt.size() < 1) return(0); 272 int optsz1 = opt.size(); 273 if(optsz1<1) return(0); 273 274 // On appelle d'abord le decodage de la classe PIDrawer de laquelle 274 275 // on herite. (Pas obligatoire) on decode donc ici les attributs de 275 276 // couleur, fontes ... 276 277 int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt); 277 if ((opt.size() - ndec1) <1) return(ndec1); // si tout a ete decode278 if(optsz1-ndec1<1) return(ndec1); // si tout a ete decode 278 279 279 280 vector<string> udopt; // On gardera ici les options non decodees … … 282 283 for( k=0; k<opt.size(); k++ ) { 283 284 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); 286 288 else { 287 289 // Si option non decode … … 306 308 void PINTuple::GetOptionsHelpInfo(string& info) 307 309 { 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 311 PIDrawer::GetOptionsHelpInfo(info); 312 info += " ---- PINTuple options help info : \n" ; 313 info += "- sta,stat,stats: activate statistic display\n"; 314 info += " nsta,nstat,nostat,nostats: deactivate statistic display\n"; 315 return; 316 }
Note:
See TracChangeset
for help on using the changeset viewer.