#include "cmd-hist.h"
Public Member Functions | |
command_history (const command_history &)=delete | |
virtual | ~command_history (void)=default |
command_history & | operator= (const command_history &)=delete |
Static Public Member Functions | |
static bool | add (const std::string &) |
static void | append (const std::string &="") |
static int | base (void) |
static void | clean_up_and_save (const std::string &="", int=-1) |
static void | clear (void) |
static int | current_number (void) |
static std::string | file (void) |
static std::string | get_entry (int) |
static int | goto_mark (void) |
static std::string | histcontrol (void) |
static void | ignore_entries (bool=true) |
static bool | ignoring_entries (void) |
static void | initialize (bool, const std::string &, int, const std::string &) |
static bool | is_initialized (void) |
static int | is_stifled (void) |
static int | length (void) |
static string_vector | list (int=-1, bool=false) |
static int | max_input_history (void) |
static void | process_histcontrol (const std::string &) |
static void | read (bool=true) |
static void | read (const std::string &, bool=true) |
static void | read_range (const std::string &, int=-1, int=-1, bool=true) |
static void | read_range (int=-1, int=-1, bool=true) |
static void | remove (int) |
static void | replace_entry (int, const std::string &) |
static void | set_file (const std::string &) |
static void | set_mark (int n) |
static void | set_size (int) |
static int | size (void) |
static void | stifle (int) |
static void | truncate_file (const std::string &="", int=-1) |
static int | unstifle (void) |
static int | where (void) |
static void | write (const std::string &="") |
Protected Member Functions | |
command_history (void) | |
virtual bool | do_add (const std::string &) |
virtual void | do_append (const std::string &) |
virtual int | do_base (void) const |
virtual void | do_clean_up_and_save (const std::string &, int) |
virtual void | do_clear (void) |
virtual int | do_current_number (void) const |
virtual std::string | do_file (void) |
virtual std::string | do_get_entry (int) const |
virtual int | do_goto_mark (void) |
virtual std::string | do_histcontrol (void) const |
virtual void | do_ignore_entries (bool) |
virtual bool | do_ignoring_entries (void) const |
virtual void | do_initialize (bool, const std::string &, int, const std::string &) |
virtual bool | do_is_initialized (void) const |
virtual int | do_is_stifled (void) const |
virtual int | do_length (void) const |
virtual string_vector | do_list (int, bool) const |
virtual int | do_max_input_history (void) const |
virtual void | do_process_histcontrol (const std::string &) |
virtual void | do_read (const std::string &, bool) |
virtual void | do_read_range (const std::string &, int, int, bool) |
virtual void | do_remove (int) |
virtual void | do_replace_entry (int, const std::string &) |
virtual void | do_set_file (const std::string &) |
virtual void | do_set_mark (int) |
virtual void | do_set_size (int) |
virtual int | do_size (void) const |
virtual void | do_stifle (int) |
virtual void | do_truncate_file (const std::string &, int) const |
virtual int | do_unstifle (void) |
virtual int | do_where (void) const |
virtual void | do_write (const std::string &) const |
void | error (const std::string &) const |
void | error (int, const std::string &msg="") const |
Protected Attributes | |
std::string | m_file |
int | m_history_control |
bool | m_ignoring_additions |
bool | m_initialized |
int | m_lines_in_file |
int | m_lines_this_session |
int | m_size |
Static Private Member Functions | |
static void | cleanup_instance (void) |
static bool | instance_ok (void) |
static void | make_command_history (void) |
Static Private Attributes | |
static command_history * | s_instance = nullptr |
Definition at line 37 of file cmd-hist.h.
|
inlineprotected |
Definition at line 43 of file cmd-hist.h.
Referenced by make_command_history().
|
delete |
|
virtualdefault |
|
static |
Definition at line 605 of file cmd-hist.cc.
References do_add(), instance_ok(), and s_instance.
Referenced by octave::edit_history_add_hist(), and octave::history_system::write_timestamp().
|
static |
Definition at line 723 of file cmd-hist.cc.
References do_append(), octave::f(), instance_ok(), and s_instance.
Referenced by octave::history_system::do_history().
|
static |
Definition at line 645 of file cmd-hist.cc.
References do_base(), instance_ok(), and s_instance.
|
static |
Definition at line 757 of file cmd-hist.cc.
References do_clean_up_and_save(), octave::f(), instance_ok(), n, and s_instance.
Referenced by Fexec(), and octave::interpreter::shutdown().
|
inlinestaticprivate |
Definition at line 140 of file cmd-hist.h.
Referenced by instance_ok().
|
static |
Definition at line 620 of file cmd-hist.cc.
References do_clear(), instance_ok(), and s_instance.
Referenced by octave::history_system::do_history().
|
static |
Definition at line 651 of file cmd-hist.cc.
References do_current_number(), instance_ok(), and s_instance.
|
protectedvirtual |
Definition at line 825 of file cmd-hist.cc.
Referenced by add().
|
protectedvirtual |
Definition at line 924 of file cmd-hist.cc.
References do_where(), error(), octave::f(), m_file, m_initialized, and m_lines_this_session.
Referenced by append().
|
protectedvirtual |
Definition at line 857 of file cmd-hist.cc.
Referenced by base(), and do_current_number().
|
protectedvirtual |
Definition at line 978 of file cmd-hist.cc.
References error(), octave::f(), m_file, and m_initialized.
Referenced by clean_up_and_save().
|
protectedvirtual |
Definition at line 835 of file cmd-hist.cc.
Referenced by clear().
|
protectedvirtual |
Definition at line 863 of file cmd-hist.cc.
References do_base(), do_where(), and m_size.
Referenced by current_number().
|
protectedvirtual |
|
protectedvirtual |
Definition at line 968 of file cmd-hist.cc.
Referenced by get_entry().
|
protectedvirtual |
Definition at line 889 of file cmd-hist.cc.
Referenced by goto_mark().
|
inlineprotectedvirtual |
Definition at line 158 of file cmd-hist.h.
Referenced by histcontrol().
|
protectedvirtual |
Definition at line 813 of file cmd-hist.cc.
References m_ignoring_additions.
Referenced by ignore_entries().
|
protectedvirtual |
Definition at line 819 of file cmd-hist.cc.
References m_ignoring_additions.
Referenced by ignoring_entries().
|
protectedvirtual |
Definition at line 768 of file cmd-hist.cc.
References m_initialized, process_histcontrol(), read(), set_file(), and set_size().
Referenced by initialize().
|
protectedvirtual |
Definition at line 783 of file cmd-hist.cc.
References m_initialized.
Referenced by is_initialized().
|
protectedvirtual |
Definition at line 879 of file cmd-hist.cc.
Referenced by is_stifled().
|
protectedvirtual |
Definition at line 845 of file cmd-hist.cc.
Referenced by length().
|
protectedvirtual |
Definition at line 962 of file cmd-hist.cc.
Referenced by list().
|
protectedvirtual |
Definition at line 851 of file cmd-hist.cc.
Referenced by max_input_history().
|
protectedvirtual |
Definition at line 764 of file cmd-hist.cc.
Referenced by process_histcontrol().
|
protectedvirtual |
Definition at line 895 of file cmd-hist.cc.
References error(), and octave::f().
Referenced by read().
|
protectedvirtual |
Definition at line 902 of file cmd-hist.cc.
References error(), and octave::f().
Referenced by read_range().
|
protectedvirtual |
Definition at line 831 of file cmd-hist.cc.
Referenced by remove().
|
protectedvirtual |
Definition at line 974 of file cmd-hist.cc.
Referenced by replace_entry().
|
protectedvirtual |
Definition at line 789 of file cmd-hist.cc.
References octave::f(), and m_file.
Referenced by set_file().
|
protectedvirtual |
Definition at line 885 of file cmd-hist.cc.
Referenced by set_mark().
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Definition at line 869 of file cmd-hist.cc.
Referenced by stifle().
|
protectedvirtual |
Definition at line 947 of file cmd-hist.cc.
References error(), octave::f(), m_file, and m_initialized.
Referenced by truncate_file().
|
protectedvirtual |
Definition at line 873 of file cmd-hist.cc.
Referenced by unstifle().
|
protectedvirtual |
Definition at line 839 of file cmd-hist.cc.
Referenced by do_append(), do_current_number(), and where().
|
protectedvirtual |
Definition at line 909 of file cmd-hist.cc.
References error(), octave::f(), m_file, and m_initialized.
Referenced by write().
|
protected |
Definition at line 1003 of file cmd-hist.cc.
|
protected |
Definition at line 993 of file cmd-hist.cc.
References current_liboctave_error_handler.
Referenced by do_append(), do_clean_up_and_save(), do_read(), do_read_range(), do_truncate_file(), and do_write().
|
static |
Definition at line 560 of file cmd-hist.cc.
References do_file(), instance_ok(), and s_instance.
Referenced by octave::history_system::do_history(), Fhistory_file(), read(), and read_range().
|
static |
Definition at line 744 of file cmd-hist.cc.
References do_get_entry(), instance_ok(), n, and s_instance.
|
static |
Definition at line 683 of file cmd-hist.cc.
References do_goto_mark(), instance_ok(), and s_instance.
|
static |
Definition at line 573 of file cmd-hist.cc.
References do_histcontrol(), instance_ok(), and s_instance.
Referenced by Fhistory_control().
|
static |
Definition at line 592 of file cmd-hist.cc.
References do_ignore_entries(), instance_ok(), and s_instance.
Referenced by octave::tree_evaluator::enter_debugger(), Fhistory_save(), and octave::interpreter::initialize_history().
|
static |
Definition at line 599 of file cmd-hist.cc.
References do_ignoring_entries(), instance_ok(), and s_instance.
Referenced by octave::tree_evaluator::enter_debugger(), Fexec(), Fhistory_save(), and octave::interpreter::shutdown().
|
static |
Definition at line 532 of file cmd-hist.cc.
References do_initialize(), instance_ok(), and s_instance.
Referenced by octave::history_system::initialize().
|
staticprivate |
Definition at line 502 of file cmd-hist.cc.
References singleton_cleanup_list::add(), cleanup_instance(), make_command_history(), retval, and s_instance.
Referenced by add(), append(), base(), clean_up_and_save(), clear(), current_number(), file(), get_entry(), goto_mark(), histcontrol(), ignore_entries(), ignoring_entries(), initialize(), is_stifled(), length(), list(), max_input_history(), process_histcontrol(), read(), read_range(), remove(), replace_entry(), set_file(), set_mark(), set_size(), size(), stifle(), truncate_file(), unstifle(), where(), and write().
|
static |
Definition at line 541 of file cmd-hist.cc.
References do_is_initialized(), and s_instance.
|
static |
Definition at line 670 of file cmd-hist.cc.
References do_is_stifled(), instance_ok(), and s_instance.
|
static |
Definition at line 633 of file cmd-hist.cc.
References do_length(), instance_ok(), and s_instance.
|
static |
Definition at line 737 of file cmd-hist.cc.
References do_list(), instance_ok(), and s_instance.
Referenced by octave::history_system::do_history(), octave::history_system::initialize(), and octave::mk_tmp_hist_file().
|
staticprivate |
Definition at line 522 of file cmd-hist.cc.
References command_history(), and s_instance.
Referenced by instance_ok().
|
static |
Definition at line 639 of file cmd-hist.cc.
References do_max_input_history(), instance_ok(), and s_instance.
|
delete |
|
static |
Definition at line 566 of file cmd-hist.cc.
References do_process_histcontrol(), instance_ok(), and s_instance.
Referenced by do_initialize(), and Fhistory_control().
|
static |
Definition at line 689 of file cmd-hist.cc.
References file().
Referenced by octave::history_system::do_history(), and do_initialize().
|
static |
Definition at line 695 of file cmd-hist.cc.
References do_read(), octave::f(), instance_ok(), and s_instance.
|
static |
Definition at line 708 of file cmd-hist.cc.
References do_read_range(), octave::f(), instance_ok(), and s_instance.
|
static |
Definition at line 702 of file cmd-hist.cc.
References file().
Referenced by octave::history_system::do_history().
|
static |
Definition at line 613 of file cmd-hist.cc.
References do_remove(), instance_ok(), n, and s_instance.
Referenced by octave::mk_tmp_hist_file().
|
static |
Definition at line 750 of file cmd-hist.cc.
References do_replace_entry(), instance_ok(), and s_instance.
|
static |
Definition at line 549 of file cmd-hist.cc.
References do_set_file(), octave::f(), instance_ok(), s_instance, and octave::sys::file_ops::tilde_expand().
Referenced by octave::history_system::do_history(), do_initialize(), and Fhistory_file().
|
static |
Definition at line 676 of file cmd-hist.cc.
References do_set_mark(), instance_ok(), n, and s_instance.
|
static |
Definition at line 579 of file cmd-hist.cc.
References do_set_size(), instance_ok(), n, and s_instance.
Referenced by do_initialize(), and Fhistory_size().
|
static |
Definition at line 586 of file cmd-hist.cc.
References do_size(), instance_ok(), and s_instance.
Referenced by Fhistory_size().
|
static |
Definition at line 657 of file cmd-hist.cc.
References do_stifle(), instance_ok(), n, and s_instance.
|
static |
Definition at line 730 of file cmd-hist.cc.
References do_truncate_file(), octave::f(), instance_ok(), n, and s_instance.
|
static |
Definition at line 664 of file cmd-hist.cc.
References do_unstifle(), instance_ok(), and s_instance.
|
static |
Definition at line 627 of file cmd-hist.cc.
References do_where(), instance_ok(), and s_instance.
|
static |
Definition at line 716 of file cmd-hist.cc.
References do_write(), octave::f(), instance_ok(), and s_instance.
Referenced by octave::history_system::do_history().
|
protected |
Definition at line 238 of file cmd-hist.h.
Referenced by do_append(), do_clean_up_and_save(), do_file(), do_set_file(), do_truncate_file(), and do_write().
|
protected |
Definition at line 229 of file cmd-hist.h.
|
protected |
Definition at line 226 of file cmd-hist.h.
Referenced by do_ignore_entries(), and do_ignoring_entries().
|
protected |
Definition at line 223 of file cmd-hist.h.
Referenced by do_append(), do_clean_up_and_save(), do_initialize(), do_is_initialized(), do_truncate_file(), and do_write().
|
protected |
Definition at line 232 of file cmd-hist.h.
|
protected |
Definition at line 235 of file cmd-hist.h.
Referenced by do_append().
|
protected |
Definition at line 241 of file cmd-hist.h.
Referenced by do_current_number(), do_set_size(), and do_size().
|
staticprivate |
Definition at line 138 of file cmd-hist.h.
Referenced by add(), append(), base(), clean_up_and_save(), clear(), current_number(), file(), get_entry(), goto_mark(), histcontrol(), ignore_entries(), ignoring_entries(), initialize(), instance_ok(), is_initialized(), is_stifled(), length(), list(), make_command_history(), max_input_history(), process_histcontrol(), read(), read_range(), remove(), replace_entry(), set_file(), set_mark(), set_size(), size(), stifle(), truncate_file(), unstifle(), where(), and write().