Joedb 9.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Client_Command_Processor.h
Go to the documentation of this file.
1#ifndef joedb_Client_Command_Processor_declared
2#define joedb_Client_Command_Processor_declared
3
6
7#include <chrono>
8
9namespace joedb
10{
11 class Client;
12
13 /// @ingroup ui
15 {
16 private:
17 void pull(std::ostream &out, std::chrono::milliseconds wait);
18 void print_status(std::ostream &out);
19
20 protected:
22
23 static void sleep(int seconds, std::ostream &out);
24 virtual std::string get_name() const {return "client";}
25
26 public:
28
29 void write_prompt(std::ostream &out) const override;
30
32 (
33 const std::string &command,
34 std::istream &parameters,
35 std::istream &in,
36 std::ostream &out
37 ) override;
38 };
39
40 /// @ingroup ui
42 {
43 private:
44 Writable_Client &get_writable_client()
45 {
47 }
48
49 std::string get_name() const override {return "writable_client";}
50
51 public:
56
58 (
59 const std::string &command,
60 std::istream &parameters,
61 std::istream &in,
62 std::ostream &out
63 ) override;
64 };
65}
66
67#endif
Status process_command(const std::string &command, std::istream &parameters, std::istream &in, std::ostream &out) override
virtual std::string get_name() const
void write_prompt(std::ostream &out) const override
static void sleep(int seconds, std::ostream &out)
Handle concurrent access to a file with a joedb::Connection.
Definition Client.h:12
Status process_command(const std::string &command, std::istream &parameters, std::istream &in, std::ostream &out) override
Writable specialization of Client.
Definition Blob.h:7