32 static constexpr const char *
const type_names[] =
39 "Interpreted_File_Database",
43 "Readonly_Interpreted_File_Database",
47 for (
const char *
const type_name: type_names)
48 out <<
" class " << type_name <<
";\n";
59 for (
const char *
const type_name: type_names)
60 out <<
" using " << type_name <<
" = " << ns << type_name <<
";\n";
62 for (
const auto &[tid, tname]: tables)
65 out <<
" using " <<
"id_of_" << tname;
66 out <<
" = " << ns <<
"id_of_" << tname <<
";\n";
67 out <<
" using iterator_of_" << tname;
68 out <<
" = " << ns <<
"container_of_" << tname <<
"::iterator;\n";
const std::vector< std::string > & get_name_space() const
const Database & get_db() const
const std::map< Table_Id, std::string > & get_tables() const override
const Compiler_Options & options
Types_h(const Compiler_Options &options)
void namespace_open(std::ostream &out, const std::vector< std::string > &n)
void namespace_close(std::ostream &out, const std::vector< std::string > &n)
void namespace_include_guard(std::ostream &out, const char *name, const std::vector< std::string > &n)
std::string namespace_string(const std::vector< std::string > &n, const char *delimiter)
One code generator for each of the file generated by joedbc.