#include <SReadline.h>
Collaboration diagram for swift::SReadline:

Public Member Functions | |
| SReadline (const size_t Limit=DefaultHistoryLimit) | |
| Constructs the object, sets the completion function. | |
| SReadline (const std::string &historyFileName, const size_t Limit=DefaultHistoryLimit) | |
| Constructs the object, sets the completion function, loads history. | |
| ~SReadline () | |
| Saves the session history (if the file name was provided) and destroys the object. | |
| std::string | GetLine (const std::string &Prompt) |
| Gets a single line from a user. | |
| template<typename Container> | |
| std::string | GetLine (const std::string &Prompt, Container &ReadTokens) |
| Gets a single line from a user. | |
| template<typename Container> | |
| std::string | GetLine (const std::string &Prompt, Container &ReadTokens, bool &BreakOut) |
| Gets a single line from a user. | |
| std::string | GetLine (const std::string &Prompt, bool &BreakOut) |
| Gets a single line from a user. | |
| template<typename ContainerType> | |
| void | GetHistory (ContainerType &Container) |
| Fills the given container with the current history list Does not clear the given container. | |
| bool | SaveHistory (std::ostream &OS) |
| Saves the history to the given file stream. | |
| bool | SaveHistory (const std::string &FileName) |
| Saves the history to the given file. | |
| void | ClearHistory () |
| Clears the history. Does not affect the file where the previous session history is saved. | |
| bool | LoadHistory (std::istream &IS) |
| Loads a history from a file stream. | |
| bool | LoadHistory (const std::string &FileName) |
| Loads a history from the given file. | |
| template<typename ContainerType> | |
| void | RegisterCompletions (const ContainerType &Container) |
| Allows to register custom completers. Supports a special keyword: file. It means to use the standard file name completer For example the given container elements could be as follows: command1 opt1 command1 opt2 file command2 command2 opt1 Each container element must describe a single possible command line The container element must have a conversion to std::string operator. | |
| void | SetKeymap (SKeymap &NewKeymap) |
| Sets the given keymap. | |
Definition at line 381 of file SReadline.h.
|
|
Constructs the object, sets the completion function.
Definition at line 387 of file SReadline.h. |
|
||||||||||||
|
Constructs the object, sets the completion function, loads history.
Definition at line 401 of file SReadline.h. References LoadHistory(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Gets a single line from a user.
Definition at line 471 of file SReadline.h. |
|
||||||||||||||||||||
|
Gets a single line from a user.
Definition at line 456 of file SReadline.h. References GetLine(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Gets a single line from a user.
Definition at line 440 of file SReadline.h. References GetLine(). Here is the call graph for this function: ![]() |
|
|
Gets a single line from a user.
Definition at line 426 of file SReadline.h. Referenced by GetLine(). |
|
|
Loads a history from the given file.
Definition at line 579 of file SReadline.h. |
|
|
Loads a history from a file stream.
Definition at line 554 of file SReadline.h. Referenced by SReadline(). |
|
||||||||||
|
Allows to register custom completers. Supports a special keyword: file. It means to use the standard file name completer For example the given container elements could be as follows: command1 opt1 command1 opt2 file command2 command2 opt1 Each container element must describe a single possible command line The container element must have a conversion to std::string operator.
Definition at line 599 of file SReadline.h. |
|
|
Saves the history to the given file.
Definition at line 533 of file SReadline.h. |
|
|
Saves the history to the given file stream.
Definition at line 519 of file SReadline.h. Referenced by ~SReadline(). |
|
|
Sets the given keymap.
Definition at line 615 of file SReadline.h. References swift::SKeymap::keymap. |
1.4.5