GamR  0.0.0
GammaROOT
Loading...
Searching...
No Matches
REPL.hh
Go to the documentation of this file.
1#ifndef GAMR_UTILS_REPL_HH
2#define GAMR_UTILS_REPL_HH
3
4#include <atomic>
5#include <functional>
6#include <mutex>
7#include <string>
8#include <thread>
9
10namespace GamR {
11namespace Utils {
12
13class REPL {
14private:
15 std::string fInput;
16 std::string fPrompt;
17 std::atomic<bool> fContinue;
18 std::atomic<bool> fNextLine;
19 std::mutex fInputLock;
20 std::thread fThread;
21
22public:
23 REPL(std::string prompt);
24 ~REPL();
25 void Prompt();
26 bool Loop();
27 bool Halt();
28 void ReadLine(std::string &input);
29};
30
31} // namespace Utils
32} // namespace GamR
33
34#endif
void ReadLine(std::string &input)
Definition REPL.cc:67
REPL(std::string prompt)
Definition REPL.cc:9
void Prompt()
Definition REPL.cc:51
bool Halt()
Definition REPL.cc:61
bool Loop()
Definition REPL.cc:56
Definition Gain.cc:19