souffle
2.0.2-371-g6315b36
|
#include <UserInputReader.h>
Public Member Functions | |
void | addHistory (std::string hist) |
void | appendTabCompletion (std::string command) |
void | appendTabCompletion (std::vector< std::string > commands) |
void | backspace () |
void | clearHistory () |
void | clearPrompt (size_t text_len) |
void | clearTabCompletion () |
std::string | getInput () |
bool | hasReceivedInput () |
void | historyDown () |
void | historyUp () |
InputReader () | |
InputReader (const InputReader &other)=default | |
void | moveCursor (char direction) |
void | moveCursorLeft () |
void | moveCursorRight () |
void | readchar () |
void | setPrompt (std::string prompt) |
void | showFullText (const std::string &text) |
void | tabComplete () |
Private Attributes | |
char | current_char = 0 |
std::string | current_hist_val |
std::vector< std::string > | current_tab_completes |
std::string | current_tab_val |
size_t | cursor_pos = 0 |
size_t | hist_pos = 0 |
std::vector< std::string > | history |
bool | in_history = false |
bool | in_tab_complete = false |
bool | inputReceived = false |
size_t | original_hist_cursor_pos = 0 |
std::string | original_hist_val |
std::string | original_tab_val |
std::string | output |
std::string | prompt = "Input: " |
std::vector< std::string > | tab_completion |
size_t | tab_pos = 0 |
Definition at line 24 of file UserInputReader.h.
|
inline |
Definition at line 45 of file UserInputReader.h.
References clearHistory(), and clearTabCompletion().
|
default |
|
inline |
Definition at line 202 of file UserInputReader.h.
References history.
Referenced by souffle::profile::Tui::runProf().
|
inline |
Definition at line 148 of file UserInputReader.h.
References tab_completion.
|
inline |
Definition at line 145 of file UserInputReader.h.
References tab_completion.
Referenced by setupTabCompletion().
|
inline |
Definition at line 289 of file UserInputReader.h.
References cursor_pos, moveCursorLeft(), output, and showFullText().
Referenced by getInput().
|
inline |
|
inline |
Definition at line 296 of file UserInputReader.h.
References cursor_pos, and i.
Referenced by historyDown(), historyUp(), showFullText(), and tabComplete().
|
inline |
Definition at line 151 of file UserInputReader.h.
References tab_completion.
Referenced by InputReader(), and setupTabCompletion().
|
inline |
Definition at line 80 of file UserInputReader.h.
References backspace(), current_char, current_hist_val, current_tab_val, cursor_pos, hist_pos, in_history, in_tab_complete, inputReceived, moveCursor(), output, readchar(), showFullText(), tab_pos, and tabComplete().
Referenced by souffle::profile::Tui::runProf().
|
inline |
Definition at line 52 of file UserInputReader.h.
References inputReceived.
Referenced by souffle::profile::Tui::runCommand(), and souffle::profile::Tui::Tui().
|
inline |
Definition at line 241 of file UserInputReader.h.
References clearPrompt(), current_hist_val, cursor_pos, hist_pos, history, in_history, original_hist_cursor_pos, and original_hist_val.
Referenced by moveCursor().
|
inline |
Definition at line 211 of file UserInputReader.h.
References clearPrompt(), current_hist_val, current_tab_val, cursor_pos, hist_pos, history, in_history, in_tab_complete, original_hist_cursor_pos, original_hist_val, and output.
Referenced by moveCursor().
|
inline |
Definition at line 258 of file UserInputReader.h.
References historyDown(), historyUp(), moveCursorLeft(), and moveCursorRight().
Referenced by getInput().
|
inline |
Definition at line 283 of file UserInputReader.h.
References cursor_pos.
Referenced by backspace(), and moveCursor().
|
inline |
Definition at line 267 of file UserInputReader.h.
References current_hist_val, current_tab_val, cursor_pos, in_history, in_tab_complete, and output.
Referenced by moveCursor().
|
inline |
|
inline |
Definition at line 142 of file UserInputReader.h.
References prompt.
Referenced by souffle::profile::Tui::runProf().
|
inline |
Definition at line 304 of file UserInputReader.h.
References clearPrompt(), cursor_pos, and i.
Referenced by backspace(), and getInput().
|
inline |
Definition at line 157 of file UserInputReader.h.
References clearPrompt(), current_hist_val, current_tab_completes, current_tab_val, cursor_pos, in_history, in_tab_complete, original_tab_val, output, tab_completion, and tab_pos.
Referenced by getInput().
|
private |
Definition at line 30 of file UserInputReader.h.
Referenced by getInput(), and readchar().
|
private |
Definition at line 37 of file UserInputReader.h.
Referenced by getInput(), historyDown(), historyUp(), moveCursorRight(), and tabComplete().
|
private |
Definition at line 40 of file UserInputReader.h.
Referenced by tabComplete().
|
private |
Definition at line 38 of file UserInputReader.h.
Referenced by getInput(), historyUp(), moveCursorRight(), and tabComplete().
|
private |
Definition at line 31 of file UserInputReader.h.
Referenced by backspace(), clearPrompt(), getInput(), historyDown(), historyUp(), moveCursorLeft(), moveCursorRight(), showFullText(), and tabComplete().
|
private |
Definition at line 32 of file UserInputReader.h.
Referenced by getInput(), historyDown(), and historyUp().
|
private |
Definition at line 28 of file UserInputReader.h.
Referenced by addHistory(), clearHistory(), historyDown(), and historyUp().
|
private |
Definition at line 35 of file UserInputReader.h.
Referenced by getInput(), historyDown(), historyUp(), moveCursorRight(), and tabComplete().
|
private |
Definition at line 34 of file UserInputReader.h.
Referenced by getInput(), historyUp(), moveCursorRight(), and tabComplete().
|
private |
Definition at line 42 of file UserInputReader.h.
Referenced by getInput(), and hasReceivedInput().
|
private |
Definition at line 41 of file UserInputReader.h.
Referenced by historyDown(), and historyUp().
|
private |
Definition at line 36 of file UserInputReader.h.
Referenced by historyDown(), and historyUp().
|
private |
Definition at line 39 of file UserInputReader.h.
Referenced by tabComplete().
|
private |
Definition at line 29 of file UserInputReader.h.
Referenced by backspace(), getInput(), historyUp(), moveCursorRight(), and tabComplete().
|
private |
Definition at line 26 of file UserInputReader.h.
Referenced by setPrompt().
|
private |
Definition at line 27 of file UserInputReader.h.
Referenced by appendTabCompletion(), clearTabCompletion(), and tabComplete().
|
private |
Definition at line 33 of file UserInputReader.h.
Referenced by getInput(), and tabComplete().