xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
CLIClient.h
Go to the documentation of this file.
1#ifndef CLIENT_CLI_CLIENT_H
2#define CLIENT_CLI_CLIENT_H
3
4#include "Client/IClient.h"
5#include <vector>
6#include <string>
7
8namespace Xale::Client
9{
10 class CLIClient : public IClient
11 {
12 public:
16 void start() override;
17
28 std::string getInput(bool* isExit) override;
29
34 void displayOutput(const std::string& output) override;
35
39 void close() override;
40
41 private:
45 void printHelp() const;
46
52 std::string readSqlFile(const std::string& path) const;
53
58 std::string readLine();
59
60 std::vector<std::string> _history;
61 };
62}
63
64#endif // CLIENT_CLI_CLIENT_H
Definition CLIClient.h:11
void displayOutput(const std::string &output) override
Displays output to the command line.
Definition CLIClient.cpp:239
void close() override
Closes the CLI client interface.
Definition CLIClient.cpp:244
void start() override
Starts the CLI client interface.
Definition CLIClient.cpp:13
std::string getInput(bool *isExit) override
Gets input from the command line.
Definition CLIClient.cpp:172
Definition IClient.h:10
Definition CLIClient.h:9