[165] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
| 2 | // Classe interpreteur de commande pour piapp
|
---|
| 3 | // Reza Aout 97 , Juillet,Aout 98
|
---|
| 4 | // LAL-IN2P3/CNRS
|
---|
| 5 |
|
---|
| 6 | #ifndef PIACMD_H_SEEN
|
---|
| 7 | #define PIACMD_H_SEEN
|
---|
| 8 |
|
---|
[293] | 9 | #include "machdefs.h"
|
---|
[2463] | 10 | #include "commander.h"
|
---|
[165] | 11 | #include <string>
|
---|
[293] | 12 | #include <vector>
|
---|
[165] | 13 |
|
---|
| 14 | #include "dlftypes.h"
|
---|
| 15 |
|
---|
[293] | 16 | // Forward declaration of some classes ...
|
---|
[165] | 17 | class NamedObjMgr;
|
---|
| 18 | class PIStdImgApp;
|
---|
[1251] | 19 |
|
---|
| 20 | class PIAHelpWind; // Fenetre d'aide en ligne
|
---|
| 21 | class CxxExecWind; // Fenetre pour CxxExecutor
|
---|
| 22 | class CxxOptionWind; // Option de CxxExecutor
|
---|
| 23 |
|
---|
[293] | 24 | // ---------------------------------------------------------------------
|
---|
| 25 | // Classe Interpreteur de commande, gestionnaire de module chargeable,
|
---|
| 26 | // et de fonctions dynamiquement linke pour PIStdImgApp
|
---|
| 27 | // Permet de gerer plusieurs Interpreter differents
|
---|
| 28 | // ---------------------------------------------------------------------
|
---|
[165] | 29 |
|
---|
[330] | 30 |
|
---|
[2463] | 31 | class PIACmd : public Commander {
|
---|
[165] | 32 | public:
|
---|
[2463] | 33 | // static PIACmd* GetInterpreter();
|
---|
[165] | 34 |
|
---|
[293] | 35 | PIACmd(NamedObjMgr* omg, PIStdImgApp* app);
|
---|
| 36 | virtual ~PIACmd();
|
---|
| 37 |
|
---|
| 38 |
|
---|
[2463] | 39 | virtual int ExecuteCommandLine(string & kw, vector<string> & tokens,
|
---|
| 40 | string & toks);
|
---|
| 41 | void ShowHelpWindow();
|
---|
| 42 | void ShowCxxOptionWindow();
|
---|
| 43 | void ShowCxxExecWindow();
|
---|
[293] | 44 |
|
---|
[2463] | 45 | // inline CmdInterpreter* CurrentInterpreter() { return(curcmdi); }
|
---|
[293] | 46 |
|
---|
| 47 | inline CmdExecutor* BaseExecutor() { return(basexec); }
|
---|
[1828] | 48 | inline CmdExecutor* ContExecutor() { return(cntexec); } //_OP_
|
---|
[293] | 49 | inline PIStdImgApp* GetImgApp() { return(mImgApp); }
|
---|
| 50 |
|
---|
[330] | 51 | // Pour utilisation par PIAHelpWind uniquement
|
---|
| 52 | virtual void UpdateHelpList(PIAHelpWind* hw, int gid);
|
---|
| 53 |
|
---|
[293] | 54 | protected:
|
---|
[2215] | 55 | virtual int CheckHelpGrp(string& grp);
|
---|
[330] | 56 |
|
---|
[2463] | 57 | virtual void SetCurrentPrompt(const char* pr);
|
---|
| 58 | virtual void ShowMessage(const char * msg, int att);
|
---|
[2236] | 59 |
|
---|
[165] | 60 | NamedObjMgr* mObjMgr;
|
---|
| 61 | PIStdImgApp* mImgApp;
|
---|
| 62 |
|
---|
[1224] | 63 | CmdExecutor* basexec; // basic command executor
|
---|
| 64 | CmdExecutor* fitexec; // Fit command executor
|
---|
| 65 | CmdExecutor* pawexec; // paw-like command executor
|
---|
| 66 | CmdExecutor* cxxexec; // on-line c++ compile/execution command executor
|
---|
[293] | 67 |
|
---|
[1828] | 68 | CmdExecutor *cntexec; // contour executor _OP_
|
---|
[1920] | 69 | CmdExecutor *flwexec; // flow chart executor _OP_
|
---|
[1828] | 70 |
|
---|
[293] | 71 | // Fenetre d'aide interactive
|
---|
| 72 | PIAHelpWind* helpwin;
|
---|
[1251] | 73 | CxxExecWind* cxxexwin;
|
---|
| 74 | CxxOptionWind* cxxoptwin;
|
---|
[165] | 75 | };
|
---|
| 76 |
|
---|
[293] | 77 |
|
---|
| 78 |
|
---|
[165] | 79 | #endif
|
---|