source: Sophya/trunk/SophyaPI/PIext/cxxexecutor.h@ 1289

Last change on this file since 1289 was 1289, checked in by ercodmgr, 25 years ago

prtlevel for cxxexecutor cmv 3/11/00

File size: 2.0 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe CxxExecutor : Dynamic C++ compile/execution in piapp
3// (c) DAPNIA (CEA) LAL (IN2P3/CNRS)
4// C. Magneville 10/2000
5
6#ifndef CXXEXECUTOR_H_SEEN
7#define CXXEXECUTOR_H_SEEN
8
9#include "machdefs.h"
10#include <stdio.h>
11#include <stdlib.h>
12#include <iostream.h>
13
14#include <vector>
15#include <string>
16
17#include "piacmd.h"
18#include "nobjmgr.h"
19
20class CxxExecutor : public CmdExecutor {
21public:
22 CxxExecutor(PIACmd* piac, PIStdImgApp* app);
23 virtual ~CxxExecutor();
24
25 virtual int Execute(string& keyw,vector<string>& args, string& toks);
26
27 inline void SetPrtLevel(uint_2 lp=2) {mPrtLevel = lp;}
28
29 int ExecuteCXX(string usercode,string userfct="");
30
31 int CrFile(string cfilename="",string func="");
32 void PutInclude(ofstream& os);
33 void PutIncludeUser(ofstream& os);
34 void PutObject(ofstream& os);
35 void PutVar(ofstream& os);
36
37 int FillUserCode(string& usercode,uint_4 first);
38 int FillUserCode(string filename);
39
40 int FillUserFctFrS(string userfctcode="");
41 int FillUserFctFrF(string filefctname="");
42
43 int Compile(string rootfilename="");
44 /* int CrMakefile(void); */
45
46 int Link(string libname="",string func="");
47 int Call(string func="");
48
49 void FillArgs(vector<string>& args);
50 void FillArgs(string& args);
51 string GetArgs(void);
52
53 void FillInclude(vector<string>& inc);
54 void FillInclude(string& inc);
55 string GetInclude(void);
56
57 void FillCompileOpt(vector<string>& copt);
58 void FillCompileOpt(string& copt);
59 string GetCompileOpt(void);
60
61 void FillLinkOpt(vector<string>& lopt);
62 void FillLinkOpt(string& lopt);
63 string GetLinkOpt(void);
64
65 void FillLinkLibs(vector<string>& llibs);
66 void FillLinkLibs(string& llibs);
67 string GetLinkLibs(void);
68
69private:
70 string mUserCodeFn;
71 string mUserFctFn;
72 string mCompOpt;
73 string mLinkOpt;
74 string mMyLibs;
75 vector<string> mIncList;
76 vector<string> mCallArgs;
77
78 string mDefTmp;
79 string mDefRoot;
80 string mDefFunc;
81
82 uint_2 mPrtLevel;
83};
84
85#endif
Note: See TracBrowser for help on using the repository browser.