![]() |
HAL
|
Stores the history of python commands. More...
#include <python_console_history.h>
Public Member Functions | |
PythonConsoleHistory () | |
~PythonConsoleHistory () | |
void | addHistory (const std::string &command) |
const std::string & | getHistoryItem (const int &index) const |
int | size () const |
void | updateFromFile () |
Stores the history of python commands.
This class manages the history of python console inputs. It can be used to access previous inputs.
Definition at line 39 of file python_console_history.h.
hal::PythonConsoleHistory::PythonConsoleHistory | ( | ) |
Constructs a new PythonConsoleHistory object.
Definition at line 9 of file python_console_history.cpp.
References updateFromFile().
hal::PythonConsoleHistory::~PythonConsoleHistory | ( | ) |
The destructor.
Definition at line 14 of file python_console_history.cpp.
void hal::PythonConsoleHistory::addHistory | ( | const std::string & | command | ) |
Add command to history and writes it back to the history file.
command | - Command to remember |
Definition at line 18 of file python_console_history.cpp.
References control::command.
const std::string & hal::PythonConsoleHistory::getHistoryItem | ( | const int & | index | ) | const |
Returns the history item at index.
index | - Index of the history item to resolve. |
Definition at line 24 of file python_console_history.cpp.
int hal::PythonConsoleHistory::size | ( | ) | const |
Get the current size of the index;
Definition at line 29 of file python_console_history.cpp.
void hal::PythonConsoleHistory::updateFromFile | ( | ) |
Reloads the history from the history file.
Definition at line 34 of file python_console_history.cpp.
Referenced by PythonConsoleHistory().