Joedb 10.2.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Memory_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(".", "Memory_Database.h", options)
13 {
14 }
15
16 ////////////////////////////////////////////////////////////////////////////
18 ////////////////////////////////////////////////////////////////////////////
19 {
21
22 out << R"RRR(
23#include "Writable_Database.h"
24#include "joedb/journal/Memory_File.h"
25
26)RRR";
27
29
30 out << R"RRR(
31 /// Shortcut to directly build a @ref Writable_Database with a Memory_File
32 class Memory_Database: public joedb::Memory_File, public Writable_Database
33 {
34 public:
35 Memory_Database(): Writable_Database(*this, joedb::Recovery::none)
36 {
37 }
38
39 void pull()
40 {
41 journal.pull();
42 play_journal();
43 }
44 };
45)RRR";
46
49 }
50}
const std::vector< std::string > & get_name_space() const
const Compiler_Options & options
Definition Generator.h:13
Memory_Database_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_open(std::ostream &out, const char *name, const std::vector< std::string > &n)
void namespace_include_guard_close(std::ostream &out)
One code generator for each of the file generated by joedbc.
Definition Client_h.cpp:5