10 using Ptr = std::shared_ptr<RosettaGenerator>;
13 boost::filesystem::path rosettaFileName;
14 boost::filesystem::path implDirectoryName;
15 boost::filesystem::path nodeListFileName;
16 std::string grammarFunctionName =
"Grammar::no_name";
17 std::string cppProtection;
18 bool strictParents =
false;
19 bool smallHeaders =
false;
25 static Ptr instance();
26 virtual std::string
name()
const override;
27 virtual std::string
purpose()
const override;
35 boost::filesystem::path fileWrtRose(
const boost::filesystem::path&);
39 void genRosettaFileBegin(std::ostream &rosetta);
40 void genRosettaFileEnd(std::ostream &rosetta);
41 void genRosettaFunctionBegin(std::ostream &rosetta);
42 void genRosettaFunctionEnd(std::ostream &rosetta);
43 void genImplFileBegin(std::ostream &impl,
const Ast::ClassPtr&);
44 void genImplFileEnd(std::ostream &impl,
const Ast::ClassPtr&);
45 void genRosettaPragmas(std::ostream &rosetta,
const std::vector<std::string>& pragmas,
const Ast::ClassPtr&);
47 size_t genRosettaPragmas(std::ostream &rosetta,
const Ast::ClassPtr&);
51 void genLeafMacros(std::ostream &rosetta,
const Ast::ClassPtr&);
52 void genClassBegin(std::ostream &rosetta,
const Ast::ClassPtr&);
53 void genClassEnd(std::ostream &rosetta,
const Ast::ClassPtr&);
54 void genClassDeclarations(std::ostream &rosetta,
const Classes&);
55 void genPropertyDataMember(std::ostream &rosetta, std::ostream &header,
const Ast::PropertyPtr&);
56 void genPropertyAccessors(std::ostream &header, std::ostream &impl,
const Ast::PropertyPtr&);
57 void genPropertyMutators(std::ostream &header, std::ostream &impl,
const Ast::PropertyPtr&);
58 void genProperty(std::ostream &rosetta, std::ostream &header, std::ostream &impl,
const Ast::PropertyPtr&);
59 void genCppConditions(std::ostream &out,
const Ast::FilePtr&,
const std::string &text);
60 void genClassDestructor(std::ostream &header, std::ostream &impl,
const Ast::ClassPtr&);
61 void genClassConstructors(std::ostream &header, std::ostream &impl,
const Ast::ClassPtr&,
const Hierarchy&);
62 void genOtherContent(std::ostream &rosetta,
const Ast::ClassPtr&,
const Hierarchy&,
const std::string &content);
63 std::vector<std::string> implementationFileNames(
const Classes&);
64 void adjustNodeList(
const std::shared_ptr<Ast::Project>&);
65 void genTupFile(
const std::vector<std::string> &implFileNames);
66 void genMakeFile(
const std::vector<std::string> &implFileNames);
67 void genCmakeFile(
const std::vector<std::string> &implFileNames);