Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
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(".", "Interpreted_File_Database.h", options)
13 {
14 }
15
16 ////////////////////////////////////////////////////////////////////////////
18 ////////////////////////////////////////////////////////////////////////////
19 {
20 namespace_include_guard(out, "Interpreted_File_Database", options.get_name_space());
21
22 out << R"RRR(
23#include "Writable_Database.h"
24#include "joedb/journal/Interpreted_File.h"
25
26)RRR";
27
28
30
31 out << R"RRR(
32 /// Open a .joedbi text file for reading or writing
33 class Interpreted_File_Database:
34 private joedb::Interpreted_File,
35 public Writable_Database
36 {
37 public:
38 Interpreted_File_Database(const char *file_name):
39 joedb::Interpreted_File(file_name),
40 Writable_Database(*static_cast<joedb::Interpreted_File *>(this))
41 {
42 }
43
44 Interpreted_File_Database(const std::string &file_name):
45 Interpreted_File_Database(file_name.c_str())
46 {
47 }
48 };
49)RRR";
50
52 out << "\n#endif\n";
53 }
54}
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