15#ifndef COMMON_LINE_READER_H
16#define COMMON_LINE_READER_H
44 void init(
const std::string &history_file);
68 replxx::Replxx reader_;
69 std::string history_file_;
70 time_t previous_history_save_time_;
71 int history_save_interval_;
A singleton class for line-reading, providing an interface to replxx。
Definition: line_reader.h:25
bool is_exit_command(const std::string &cmd)
Check if the command is an exit command
Definition: line_reader.cpp:66
std::string my_readline(const std::string &prompt)
Read a line from input
Definition: line_reader.cpp:35
void init(const std::string &history_file)
Initialize the lineReader with history file
Definition: line_reader.cpp:29
static MiniobLineReader & instance()
Get the singleton instance
Definition: line_reader.cpp:23
bool check_and_save_history()
Check if history should be auto-saved
Definition: line_reader.cpp:77