Changeset 2536 in Sophya for trunk/SophyaPI/PIext/basexecut.cc


Ignore:
Timestamp:
May 13, 2004, 1:54:02 PM (21 years ago)
Author:
ansari
Message:

Correction bug ds PIACmd : remplacement stack<string> par queue<string> pour empilement de commandes soumises a l'interpreteur et ajout commande bargraph pour drawer PIBarGraph - Reza 13 Mai 2004

File:
1 edited

Legend:

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

    r2521 r2536  
    1616#include "nomgadapter.h"
    1717#include "piyfxdrw.h"
     18#include "pibargraph.h"
    1819
    1920#include "histos.h"
     
    739740  while (tokens.size() < 3) tokens.push_back("");
    740741  mObjMgr->DisplayVector(tokens[0], tokens[1], tokens[2]);
     742}
     743else if (kw == "bargraph") {
     744  if (tokens.size() < 2) {
     745    cout << "Usage: bargraph gr_opt v1 [v2 ...]" << endl;
     746    return(0);
     747  }
     748  PIBarGraph* bgd = new PIBarGraph;
     749  for(int k=1; k<tokens.size(); k++)
     750    bgd->AddBar(atof(tokens[k].c_str()));
     751  string grname = "BarGraph";
     752  mImgApp->DispScDrawer(bgd, grname, tokens[0]);
    741753}
    742754
     
    16041616usage += "\n  Related commands: disp nt2d "; 
    16051617mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
     1618kw = "bargraph";
     1619usage = "Bar-Graph view of a sequence of values ";
     1620usage += "\n Usage : bargraph graphic_attributes v1 [v2 v3 ...] ";
     1621usage += "\n  Related commands: disp nt2d vecplot"; 
     1622mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
    16061623
    16071624// Ceci est maintenant obsolete, on garde pour info.
Note: See TracChangeset for help on using the changeset viewer.