ROSE  0.11.137.0
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 
19 class 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:
38  SgProject* getAstRoot();
40  void setAstRoot(SgProject*);
41  void setStatusCode(int code) { statusCode=code; }
42  private:
43  SgProject* sageProject;
44  int statusCode;
45 };
46 
47 class ROSE_DLL_API CppToVendorTranslator : public CppToCppTranslator {
48 protected:
50  virtual void backend();
51 };
52 
53 class 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 
61 class ROSE_DLL_API CppToDotTranslator : public CppToCppTranslator {
62  protected:
64  void backend();
65 };
66 
67 
68 class ROSE_DLL_API RoseTestTranslator : public CppToVendorTranslator {
69  protected:
72  virtual void midend();
73 };
74 
75 #endif
Default Cpp2Cpp Translator.
This class represents a source project, with a list of SgFile objects and global information about th...