Changeset 463 in Sophya for trunk/SophyaPI/PIext/piacmd.cc


Ignore:
Timestamp:
Oct 12, 1999, 6:26:18 PM (26 years ago)
Author:
ercodmgr
Message:

HelpToTex + CopyObj (ds Adapter) et PawExecutor cmv+Reza 12/10/99

File:
1 edited

Legend:

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

    r449 r463  
    1414#include "nobjmgr.h"
    1515#include "piafitting.h"
     16#include "pawexecut.h"
    1617
    1718#include PISTDWDG_H
     
    311312basexec = new PIABaseExecutor(this, omg, app);
    312313fitexec = new PIAFitter(this, app);
     314pawexec = new PAWExecutor(this, app);
    313315AddInterpreter(this);
    314316curcmdi = this;
     
    331333delete basexec;
    332334delete fitexec;
     335delete pawexec;
    333336}
    334337
     
    901904}
    902905
    903 
     906/* --Methode-- */
     907void PIACmd::HelptoLaTex(string const & fname)
     908{
     909FILE *fip;
     910if ((fip = fopen(fname.c_str(), "w")) == NULL)   {
     911  cout << "PIACmd::HelptoLaTex_Error: fopen( " << fname << endl;
     912  return;
     913  }
     914
     915fputs("% ----- Liste des groupes de Help ----- \n",fip);
     916fputs("List of {\\bf piapp} on-line Help groups: \n", fip);
     917fputs("\\begin{itemize} \n",fip);
     918CmdHGroup::iterator it;
     919for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++)
     920  fprintf(fip,"\\item {\\bf %s } \n", (*it).first.c_str());
     921
     922fputs("\\end{itemize} \n",fip);
     923
     924fputs("% ----- Liste des commandes dans chaque groupe ----- \n",fip);
     925fputs("\\newpage \n",fip);
     926CmdExmap::iterator ite;
     927int gid;
     928for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++) {
     929  gid = (*it).second;
     930  if (gid == 0)  continue;
     931  fprintf(fip,"\\subsection{%s} \n", (*it).first.c_str());
     932  for(ite = helpexmap.begin(); ite != helpexmap.end(); ite++) {
     933    if ((*ite).second.group != gid)  continue;
     934    fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Help item {\\bf \\Large %s } \n",
     935            (*ite).first.c_str());
     936    fputs("\\begin{verbatim} \n",fip);
     937    fprintf(fip,"%s\n", (*ite).second.us.c_str());
     938    fputs("\\end{verbatim} \n",fip);
     939    }
     940  for(ite = cmdexmap.begin(); ite != cmdexmap.end(); ite++) {
     941    if ((*ite).second.group != gid)  continue;
     942    fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Command {\\bf \\Large %s } \n",
     943            (*ite).first.c_str());
     944    fputs("\\begin{verbatim} \n",fip);
     945    fprintf(fip,"%s\n", (*ite).second.us.c_str());
     946    fputs("\\end{verbatim} \n",fip);
     947    }
     948}
     949
     950fclose(fip);
     951return;
     952}
     953
     954
     955
Note: See TracChangeset for help on using the changeset viewer.