ROSE 0.11.145.147
roseTranslators.h
1#ifndef ROSETRANSLATORS_H
2#define ROSETRANSLATORS_H
3
4// MSTL
5#include <Translator.h>
6
7//#include <sage3.h>
8#include <AstDOTGeneration.h>
9
10#include <AstJSONGeneration.h>
11
12#include <AstConsistencyTests.h>
13
19class ROSE_DLL_API CppToCppTranslator : public Translator<int> {
20
21 public:
23 virtual ~CppToCppTranslator();
24 virtual void setOptions(int argc,char** argv);
25 virtual void setOptions(const std::vector <std::string>& argvList);
26 virtual void frontend();
27 virtual void midend();
28 virtual void backend();
30 virtual int status();
33 virtual void printMessage(std::string s);
34
35 protected:
41 void setStatusCode(int code) { statusCode=code; }
42 private:
43 SgProject* sageProject;
44 int statusCode;
45};
46
47class ROSE_DLL_API CppToVendorTranslator : public CppToCppTranslator {
48protected:
50 virtual void backend();
51};
52
53class ROSE_DLL_API CppToJsonTranslator : public CppToCppTranslator {
54 public:
55 static bool dumpFullAST; // a flag to indicate if full AST (including parts from headers) should be dumped
56 protected:
58 virtual void backend();
59};
60
61class ROSE_DLL_API CppToDotTranslator : public CppToCppTranslator {
62 protected:
64 void backend();
65};
66
67
68class ROSE_DLL_API RoseTestTranslator : public CppToVendorTranslator {
69 protected:
72 virtual void midend();
73};
74
75#endif
Default Cpp2Cpp Translator.
virtual int status()
the status code allows to report front/mid/backend warnings and errors.
virtual void printMessage(std::string s)
messages to the user (stdout).
void setAstRoot(SgProject *)
The AST root is set by the frontend.
SgProject * getAstRoot()
This function is used to get the root of the Ast which is generated by the frontend.
virtual void backend()
virtual void backend()
virtual void midend()
The frontend and backend are default, the midend implements a test on the ROSE infrastructure.
This class represents a source project, with a list of SgFile objects and global information about th...