#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.
octave::history_system::history_system | ( | interpreter & | interp | ) |
Definition at line 270 of file oct-hist.cc.
|
delete |
|
default |
|
staticprivate |
Definition at line 538 of file oct-hist.cc.
References octave::sys::file_ops::concat(), octave::sys::env::get_home_directory(), and octave::sys::env::getenv().
Referenced by do_history(), and initialize().
|
staticprivate |
Definition at line 554 of file oct-hist.cc.
References octave::sys::env::getenv().
Referenced by initialize().
|
staticprivate |
Definition at line 571 of file oct-hist.cc.
References octave::sys::env::get_host_name(), octave::sys::env::get_user_name(), and OCTAVE_VERSION.
void octave::history_system::do_edit_history | ( | const octave_value_list & | args = octave_value_list () | ) |
Definition at line 451 of file oct-hist.cc.
References octave::action_container::add_fcn(), octave::edit_history_add_hist(), octave::edit_history_readline(), octave::environment::editor(), error(), octave::sys::fstream(), octave::interpreter::get_environment(), octave::ignore_interrupts(), m_input_from_tmp_file, m_interpreter, octave::mk_tmp_hist_file(), name, octave::action_container::protect_var(), octave::set_interrupt_handler(), octave::source_file(), and octave::unlink_cleanup().
Referenced by Fedit_history().
string_vector octave::history_system::do_history | ( | const octave_value_list & | args = octave_value_list () , |
int | nargout = 0 |
||
) |
Definition at line 325 of file oct-hist.cc.
References octave::action_container::add_fcn(), octave::command_history::append(), octave::command_history::clear(), octave::event_manager::clear_history(), default_file(), err_wrong_type_arg(), error(), octave::command_history::file(), octave::interpreter::get_event_manager(), octave_value::int_value(), octave_value::is_string(), octave_value::isnumeric(), len, octave_value_list::length(), octave::command_history::list(), m_interpreter, string_vector::numel(), octave_stdout, panic_impossible, octave::command_history::read(), octave::command_history::read_range(), octave::command_history::set_file(), octave::event_manager::set_history(), octave_value::string_value(), and octave::command_history::write().
Referenced by Fhistory(), and octave::main_window::handle_clear_history_request().
void octave::history_system::do_run_history | ( | const octave_value_list & | args = octave_value_list () | ) |
Definition at line 517 of file oct-hist.cc.
References octave::action_container::add_fcn(), m_input_from_tmp_file, octave::mk_tmp_hist_file(), name, octave::action_container::protect_var(), octave::source_file(), and octave::unlink_cleanup().
Referenced by Frun_history().
void octave::history_system::initialize | ( | bool | read_history_file = false | ) |
Definition at line 275 of file oct-hist.cc.
References default_file(), default_size(), octave::interpreter::get_event_manager(), octave::sys::env::getenv(), octave::command_history::initialize(), octave::command_history::list(), m_interpreter, and octave::event_manager::set_history().
Referenced by octave::interpreter::initialize_history().
|
inline |
Definition at line 65 of file oct-hist.h.
References m_input_from_tmp_file, and set().
octave_value octave::history_system::input_from_tmp_file | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 304 of file oct-hist.cc.
References m_input_from_tmp_file, and set_internal_variable().
Referenced by octave::base_lexer::input_from_tmp_history_file().
|
inline |
Definition at line 60 of file oct-hist.h.
References m_input_from_tmp_file.
|
delete |
|
inlineprivate |
Definition at line 109 of file oct-hist.h.
Referenced by input_from_tmp_file(), and timestamp_format_string().
octave_value octave::history_system::timestamp_format_string | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 312 of file oct-hist.cc.
References m_timestamp_format_string, and set_internal_variable().
Referenced by Fhistory_timestamp_format_string(), and octave::interpreter::maximum_braindamage().
|
inline |
Definition at line 78 of file oct-hist.h.
References m_timestamp_format_string, and set().
|
inline |
Definition at line 73 of file oct-hist.h.
References m_timestamp_format_string.
void octave::history_system::write_timestamp | ( | void | ) |
Definition at line 286 of file oct-hist.cc.
References octave::command_history::add(), octave::event_manager::append_history(), octave::interpreter::get_event_manager(), m_interpreter, m_timestamp_format_string, and octave::sys::base_tm::strftime().
Referenced by Fexec(), and octave::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().