Changeset 2524 in Sophya
- Timestamp:
- Mar 23, 2004, 10:24:36 AM (22 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintup3d.cc
r2400 r2524 282 282 de string fourni en entree - ce qui permet l'enchainement eventuel 283 283 de plusieurs decodages de string. 284 Les options peuvent etre sous forme de flag : " stat" "nostat"284 Les options peuvent etre sous forme de flag : "connectpoints" "noconnectpoints" 285 285 ou plus complexes, par exemple "dynamic=-3,3" 286 286 Rc: La methode renvoie le nombre d'options decodees … … 291 291 { 292 292 int optsz1 = opt.size(); 293 if(optsz1<1) return(0); 293 if(optsz1<1) return(0); 294 294 // On appelle d'abord le decodage de la classe PIDrawer de laquelle 295 295 // on herite. (Pas obligatoire) on decode donc ici les attributs de … … 303 303 for( k=0; k<opt.size(); k++ ) { 304 304 string opts = opt[k]; 305 // if(opts=="sta" || opts=="stat" || opts=="stats") SetStats(true);306 // else if( opts=="nsta" || opts=="nstat"307 // || opts=="nostat" || opts=="nostats") SetStats(false);308 305 if (opts == "connectpoints") ConnectPoints(true); 309 306 else if (opts == "noconnectpoints") ConnectPoints(false); … … 333 330 } 334 331 332 int PINTuple3D::OptionToString(vector<string> & opt) const 333 { 334 PIDrawer::OptionToString(opt); 335 336 if(connectPts) opt.push_back("connectpoints"); 337 else opt.push_back("noconnectpoints"); 338 339 if(colorScale) opt.push_back("colorscale"); 340 else opt.push_back("nocolorscale"); 341 342 if(mrkSzScale) { 343 char str[256]; 344 if(nWbins>0) {sprintf(str,"sizescale=%d",nWbins); opt.push_back(str);} 345 else opt.push_back("sizescale"); 346 } else opt.push_back("nosizescale"); 347 348 if(mAutoScaleXY) opt.push_back("rescalexy"); 349 else opt.push_back("norescalexy"); 350 351 if(mAutoScaleZ) opt.push_back("rescalez"); 352 else opt.push_back("norescalez"); 353 354 return 1; 355 } 356 335 357 /* La methode GetOptionsHelpInfo(string& info) renvoie une chaine 336 358 avec la description des options comprises par ce drawer -
trunk/SophyaPI/PIext/pintup3d.h
r2400 r2524 31 31 // Methode de decodage des options 32 32 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 33 virtual int OptionToString(vector<string> & opt) const; 33 34 // Texte d'aide des options disponibles 34 35 virtual void GetOptionsHelpInfo(string& info); … … 52 53 53 54 #endif 54 55 56 57 -
trunk/SophyaPI/PIext/pintuple.cc
r2517 r2524 373 373 } 374 374 375 int PINTuple::OptionToString(vector<string> & opt) const 376 { 377 PIDrawer::OptionToString(opt); 378 379 char str[256]; 380 381 if(stats) opt.push_back("stat"); else opt.push_back("nstat"); 382 383 sprintf(str,"statposoff=%g,%g",spoX,spoY); opt.push_back(str); 384 385 if(connectPts) opt.push_back("connectpoints"); 386 else opt.push_back("noconnectpoints"); 387 388 if(colorScale) opt.push_back("colorscale"); 389 else opt.push_back("nocolorscale"); 390 391 if(mrkSzScale) { 392 if(nWbins>0) {sprintf(str,"sizescale=%d",nWbins); opt.push_back(str);} 393 else opt.push_back("sizescale"); 394 } else opt.push_back("nosizescale"); 395 396 return 1; 397 } 398 375 399 /* La methode GetOptionsHelpInfo(string& info) renvoie une chaine 376 400 avec la description des options comprises par ce drawer -
trunk/SophyaPI/PIext/pintuple.h
r2517 r2524 42 42 // Methode de decodage des options 43 43 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 44 virtual int OptionToString(vector<string> & opt) const; 44 45 // Texte d'aide des options disponibles 45 46 virtual void GetOptionsHelpInfo(string& info);
Note:
See TracChangeset
for help on using the changeset viewer.