Joedb 10.0.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Readonly_Interpreted_File_Database_h.cpp
Go to the documentation of this file.
3
4namespace joedb::generator
5{
6 ////////////////////////////////////////////////////////////////////////////
8 ////////////////////////////////////////////////////////////////////////////
9 (
10 const Compiler_Options &options
11 ):
12 Generator(".", "Readonly_Interpreted_File_Database.h", options)
13 {
14 }
15
16 ////////////////////////////////////////////////////////////////////////////
18 ////////////////////////////////////////////////////////////////////////////
19 {
20 namespace_include_guard(out, "Readonly_Interpreted_File_Database", options.get_name_space());
21
22 out << R"RRR(
23#include "Readonly_Database.h"
24#include "joedb/journal/Readonly_Interpreted_File.h"
25
26)RRR";
27
28
30
31 out << R"RRR(
32 /// @ref Readonly_Database for a .joedbi text file
33 class Readonly_Interpreted_File_Database: public Readonly_Database
34 {
35 public:
36 Readonly_Interpreted_File_Database(const char *file_name):
37 Readonly_Database(joedb::Readonly_Interpreted_File(file_name))
38 {
39 }
40
41 Readonly_Interpreted_File_Database(const std::string &file_name):
42 Readonly_Interpreted_File_Database(file_name.c_str())
43 {
44 }
45 };
46)RRR";
47
49 out << "\n#endif\n";
50 }
51}
const std::vector< std::string > & get_name_space() const
const Compiler_Options & options
Definition Generator.h:14
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)
One code generator for each of the file generated by joedbc.
Definition Client_h.cpp:5