#include "oct-hist.h"
Public Member Functions | |
history_system (const history_system &)=delete | |
history_system (interpreter &interp) | |
~history_system (void)=default | |
void | do_edit_history (const octave_value_list &args=octave_value_list()) |
string_vector | do_history (const octave_value_list &args=octave_value_list(), int nargout=0) |
void | do_run_history (const octave_value_list &args=octave_value_list()) |
void | initialize (bool read_history_file=false) |
bool | input_from_tmp_file (bool flag) |
octave_value | input_from_tmp_file (const octave_value_list &args, int nargout) |
bool | input_from_tmp_file (void) const |
history_system & | operator= (const history_system &)=delete |
octave_value | timestamp_format_string (const octave_value_list &args, int nargout) |
std::string | timestamp_format_string (const std::string &file) |
std::string | timestamp_format_string (void) const |
void | write_timestamp (void) |
Private Member Functions | |
template<typename T > | |
T | set (T &var, const T &new_val) |
Static Private Member Functions | |
static std::string | default_file (void) |
static int | default_size (void) |
static std::string | default_timestamp_format (void) |
Private Attributes | |
bool | m_input_from_tmp_file |
interpreter & | m_interpreter |
std::string | m_timestamp_format_string |
Definition at line 41 of file oct-hist.h.
history_system::history_system | ( | interpreter & | interp | ) |
Definition at line 263 of file oct-hist.cc.
|
delete |
|
default |
|
staticprivate |
Definition at line 527 of file oct-hist.cc.
References dir_sep_str(), and make_absolute().
Referenced by do_history(), and initialize().
|
staticprivate |
Definition at line 553 of file oct-hist.cc.
Referenced by initialize().
|
staticprivate |
Definition at line 570 of file oct-hist.cc.
References OCTAVE_VERSION.
void history_system::do_edit_history | ( | const octave_value_list & | args = octave_value_list () | ) |
Definition at line 446 of file oct-hist.cc.
References edit_history_add_hist(), edit_history_readline(), error(), fstream(), interpreter::get_environment(), ignore_interrupts(), m_input_from_tmp_file, m_interpreter, mk_tmp_hist_file(), set_interrupt_handler(), source_file(), system(), and unlink().
Referenced by Fedit_history().
string_vector history_system::do_history | ( | const octave_value_list & | args = octave_value_list () , |
int | nargout = 0 |
||
) |
Definition at line 318 of file oct-hist.cc.
References command_history::append(), command_history::clear(), event_manager::clear_history(), default_file(), err_wrong_type_arg(), error(), command_history::file(), interpreter::get_event_manager(), octave_value::int_value(), octave_value::is_string(), octave_value::isnumeric(), len, octave_value_list::length(), command_history::list(), m_interpreter, octave_stdout, panic_impossible, command_history::read(), command_history::read_range(), command_history::set_file(), event_manager::set_history(), octave_value::string_value(), and command_history::write().
Referenced by Fhistory(), and main_window::handle_clear_history_request().
void history_system::do_run_history | ( | const octave_value_list & | args = octave_value_list () | ) |
Definition at line 509 of file oct-hist.cc.
References m_input_from_tmp_file, mk_tmp_hist_file(), source_file(), and unlink().
Referenced by Frun_history().
void history_system::initialize | ( | bool | read_history_file = false | ) |
Definition at line 268 of file oct-hist.cc.
References default_file(), default_size(), interpreter::get_event_manager(), command_history::initialize(), command_history::list(), m_interpreter, and event_manager::set_history().
Referenced by interpreter::initialize_history().
|
inline |
Definition at line 65 of file oct-hist.h.
octave_value history_system::input_from_tmp_file | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 297 of file oct-hist.cc.
References m_input_from_tmp_file, and set_internal_variable().
Referenced by base_lexer::input_from_tmp_history_file().
|
inline |
Definition at line 60 of file oct-hist.h.
|
delete |
|
inlineprivate |
Definition at line 109 of file oct-hist.h.
octave_value history_system::timestamp_format_string | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 305 of file oct-hist.cc.
References m_timestamp_format_string, and set_internal_variable().
Referenced by Fhistory_timestamp_format_string(), and interpreter::maximum_braindamage().
|
inline |
Definition at line 78 of file oct-hist.h.
|
inline |
Definition at line 73 of file oct-hist.h.
void history_system::write_timestamp | ( | void | ) |
Definition at line 279 of file oct-hist.cc.
References command_history::add(), event_manager::append_history(), interpreter::get_event_manager(), m_interpreter, and m_timestamp_format_string.
Referenced by Fexec(), and interpreter::shutdown().
|
private |
Definition at line 96 of file oct-hist.h.
Referenced by do_edit_history(), do_run_history(), and input_from_tmp_file().
|
private |
Definition at line 93 of file oct-hist.h.
Referenced by do_edit_history(), do_history(), initialize(), and write_timestamp().
|
private |
Definition at line 100 of file oct-hist.h.
Referenced by timestamp_format_string(), and write_timestamp().