roadrunner  2.6.0
Fast simulator for SBML models
rrCCompiler.h
1 #ifndef rrCompilerH
2 #define rrCompilerH
3 #include <vector>
4 #include <string>
5 #include "rrCompiler.h"
6 #include "rrStringList.h"
7 
8 using std::vector;
9 using std::string;
10 
11 namespace rr
12 {
13 
17 class RR_DECLSPEC CCompiler : public Compiler
18 {
19 public:
20  CCompiler(const std::string& supportCodeFolder, const std::string& compiler);
21  virtual ~CCompiler();
22 
23  virtual std::string getCompiler() const;
24  virtual bool setCompiler(const std::string& compiler);
25 
26  bool setupCompiler(const std::string& supportCodeFolder);
27  bool compile(const std::string& cmdLine);
28 
29  virtual bool setCompilerLocation(const std::string& path);
30  virtual std::string getCompilerLocation() const;
31 
32  virtual bool setSupportCodeFolder(const std::string& path);
33  virtual std::string getSupportCodeFolder() const;
34 
35  bool setIncludePath(const std::string& path);
36  bool setLibraryPath(const std::string& path);
37  void execute(StringList& oProxyCode);
38  bool compileSource(const std::string& cSource);
39  std::string getCompilerMessages();
40  bool setOutputPath(const std::string& path);
41 
42 
43  virtual std::string getDefaultTargetTriple();
44 
45  virtual std::string getProcessTriple();
46 
47  virtual std::string getHostCPUName();
48 
49  virtual std::string getVersion();
50 
51 private:
52  std::string mDLLFileName;
53  std::string mSupportCodeFolder;
54  std::string mCompilerName;
55  std::string mCompilerLocation; //Path to executable
56 
57  std::vector<std::string> mCompilerOutput;
58  std::vector<std::string> mIncludePaths;
59  std::vector<std::string> mLibraryPaths;
60  std::vector<std::string> mCompilerFlags;
61  std::string createCompilerCommand(const std::string& sourceFileName);
62  bool setupCompilerEnvironment();
63  std::string mOutputPath;
64 
65 };
66 
67 } //namespace rr
68 
69 
70 #endif
compiler class for the C based model system.
Definition: rrCCompiler.h:18
interface to manipulate 'compiler' settings.
Definition: rrCompiler.h:26
Definition: rrStringList.h:19
C_DECL_SPEC int rrcCallConv compileSource(RRHandle handle, const char *sourceFileNameAndPath)
Compiles source code.
C_DECL_SPEC bool rrcCallConv setSupportCodeFolder(RRHandle handle, const char *folder)
Set the path to a folder containing support code for model generation.
C_DECL_SPEC char *rrcCallConv getCompilerLocation(RRHandle handle)
Get the path to a folder containing the compiler being used.
C_DECL_SPEC bool rrcCallConv setCompiler(RRHandle handle, const char *fNameWithPath)
Set the path and filename to the compiler to be used by roadrunner.
C_DECL_SPEC bool rrcCallConv setCompilerLocation(RRHandle handle, const char *folder)
Set the path to a folder containing the compiler to be used.
C_DECL_SPEC char *rrcCallConv getSupportCodeFolder(RRHandle handle)
Get the path to a folder containing support code.
C_DECL_SPEC char *rrcCallConv getCompiler(RRHandle handle)
Get the name of the compiler currently being used by roadrunner.
C_DECL_SPEC int rrcCallConv getVersion()