Joedb
9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
src
joedb
journal
Readonly_Interpreted_File.cpp
Go to the documentation of this file.
1
#include "
joedb/journal/Readonly_Interpreted_File.h
"
2
#include "
joedb/Multiplexer.h
"
3
#include "
joedb/ui/Interpreter.h
"
4
5
namespace
joedb
6
{
7
////////////////////////////////////////////////////////////////////////////
8
Readonly_Interpreted_File::Readonly_Interpreted_File
9
////////////////////////////////////////////////////////////////////////////
10
(
11
std::istream &stream,
12
bool
readonly
13
):
14
journal(*this)
15
{
16
stream.exceptions(std::ios::badbit);
17
18
Multiplexer
multiplexer{
db
,
journal
};
19
Interpreter
interpreter
(
db
, multiplexer,
nullptr
, multiplexer, 0);
20
interpreter
.set_echo(
false
);
21
interpreter
.set_rethrow(
true
);
22
{
23
std::ofstream
null_stream
;
24
interpreter
.main_loop(stream,
null_stream
);
25
}
26
journal
.
default_checkpoint
();
27
28
if
(readonly)
29
make_readonly
();
30
}
31
32
////////////////////////////////////////////////////////////////////////////
33
Readonly_Interpreted_File::~Readonly_Interpreted_File
() =
default
;
34
////////////////////////////////////////////////////////////////////////////
35
}
Interpreter.h
Readonly_Interpreted_File.h
joedb::Buffered_File::read
T read()
Definition
Buffered_File.h:156
joedb::Buffered_File::make_readonly
void make_readonly()
Definition
Buffered_File.h:85
joedb::Interpreter
Definition
Interpreter.h:54
joedb::Multiplexer
Definition
Multiplexer.h:15
joedb::Readonly_Interpreted_File::Readonly_Interpreted_File
Readonly_Interpreted_File(std::istream &stream, bool readonly)
Definition
Readonly_Interpreted_File.cpp:10
joedb::Readonly_Interpreted_File::~Readonly_Interpreted_File
~Readonly_Interpreted_File()
joedb::Readonly_Interpreted_File::journal
Writable_Journal journal
Definition
Readonly_Interpreted_File.h:16
joedb::Readonly_Interpreted_File::db
Database db
Definition
Readonly_Interpreted_File.h:17
joedb::Writable::default_checkpoint
void default_checkpoint()
Definition
Writable.cpp:32
joedb
Definition
Blob.h:7
Multiplexer.h
Generated by
1.9.8