Changeset 2524 in Sophya for trunk/SophyaPI/PIext/pintup3d.cc


Ignore:
Timestamp:
Mar 23, 2004, 10:24:36 AM (22 years ago)
Author:
cmv
Message:

OptionToString dans NTuple et NTuple3D cmv 23/03/04

File:
1 edited

Legend:

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

    r2400 r2524  
    282282    de string fourni en entree - ce qui permet l'enchainement eventuel
    283283    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"
    285285    ou plus complexes, par exemple "dynamic=-3,3"
    286286    Rc: La methode renvoie le nombre d'options decodees
     
    291291{
    292292  int optsz1 = opt.size();
    293   if(optsz1<1)  return(0); 
     293  if(optsz1<1)  return(0);
    294294  // On appelle d'abord le decodage de la classe PIDrawer de laquelle
    295295  // on herite. (Pas obligatoire) on decode donc ici les attributs de
     
    303303  for( k=0; k<opt.size(); k++ ) {
    304304    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);
    308305    if (opts == "connectpoints") ConnectPoints(true);
    309306    else if (opts == "noconnectpoints") ConnectPoints(false);
     
    333330}
    334331
     332int 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
    335357/* La methode GetOptionsHelpInfo(string& info) renvoie une chaine
    336358   avec la description des options comprises par ce drawer 
Note: See TracChangeset for help on using the changeset viewer.