GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
default_command_editor Class Reference
Inheritance diagram for default_command_editor:
Collaboration diagram for default_command_editor:

Public Types

typedef int(* char_is_quoted_fcn) (const std::string &, int)
 
typedef std::string(* completion_fcn) (const std::string &, int)
 
typedef char *(* completion_hook_fcn) ()
 
typedef std::string(* dequoting_fcn) (const std::string &, int)
 
typedef int(* event_hook_fcn) (void)
 
typedef int(* pre_input_hook_fcn) (void)
 
typedef std::string(* quoting_fcn) (const std::string &, int, char)
 
typedef int(* startup_hook_fcn) (void)
 
typedef void(* user_accept_line_fcn) (const std::string &)
 

Public Member Functions

 default_command_editor (const default_command_editor &)=delete
 
 default_command_editor (void)
 
 ~default_command_editor (void)=default
 
void do_accept_line (void)
 
string_vector do_generate_filename_completions (const std::string &text)
 
std::string do_get_current_line (void) const
 
FILE * do_get_input_stream (void)
 
std::string do_get_line_buffer (void) const
 
FILE * do_get_output_stream (void)
 
char do_get_prev_char (int) const
 
void do_insert_text (const std::string &text)
 
void do_kill_full_line (void)
 
void do_newline (void)
 
std::string do_readline (const std::string &prompt, bool &eof)
 
void do_replace_line (const std::string &text, bool clear_undo)
 
void do_set_input_stream (FILE *f)
 
void do_set_output_stream (FILE *f)
 
default_command_editoroperator= (const default_command_editor &)=delete
 

Static Public Member Functions

static void accept_line (void)
 
static void add_event_hook (event_hook_fcn f)
 
static void add_pre_input_hook (pre_input_hook_fcn f)
 
static void add_startup_hook (startup_hook_fcn f)
 
static void blink_matching_paren (bool flag)
 
static void clear_screen (bool skip_redisplay=false)
 
static void clear_undo_list (void)
 
static int current_command_number (void)
 
static std::string decode_prompt_string (const std::string &s)
 
static bool erase_empty_line (bool flag)
 
static bool event_loop_interrupted (void)
 
static bool filename_completion_desired (bool)
 
static bool filename_quoting_desired (bool)
 
static void force_default_editor (void)
 
static string_vector generate_filename_completions (const std::string &text)
 
static char_is_quoted_fcn get_char_is_quoted_function (void)
 
static completion_fcn get_completion_function (void)
 
static std::string get_current_line (void)
 
static dequoting_fcn get_dequoting_function (void)
 
static FILE * get_input_stream (void)
 
static std::string get_line_buffer (void)
 
static FILE * get_output_stream (void)
 
static char get_prev_char (int)
 
static quoting_fcn get_quoting_function (void)
 
static user_accept_line_fcn get_user_accept_line_function (void)
 
static void increment_current_command_number (void)
 
static int insert_initial_input (void)
 
static void insert_text (const std::string &text)
 
static bool interrupt (bool=true)
 
static void interrupt_event_loop (bool flag=true)
 
static void kill_full_line (void)
 
static void newline (void)
 
static bool prefer_env_winsize (bool)
 
static void re_read_init_file (void)
 
static void read_init_file (const std::string &file="")
 
static std::string readline (const std::string &prompt)
 
static std::string readline (const std::string &prompt, bool &eof)
 
static void redisplay (void)
 
static void remove_event_hook (event_hook_fcn f)
 
static void remove_pre_input_hook (pre_input_hook_fcn f)
 
static void remove_startup_hook (startup_hook_fcn f)
 
static void replace_line (const std::string &text, bool clear_undo=true)
 
static void reset_current_command_number (int n)
 
static void resize_terminal (void)
 
static void restore_terminal_state (void)
 
static void run_event_hooks (void)
 
static void set_basic_quote_characters (const std::string &s)
 
static void set_basic_word_break_characters (const std::string &s)
 
static void set_char_is_quoted_function (char_is_quoted_fcn f)
 
static void set_completer_quote_characters (const std::string &s)
 
static void set_completer_word_break_characters (const std::string &s)
 
static void set_completion_append_character (char c)
 
static void set_completion_function (completion_fcn f)
 
static void set_dequoting_function (dequoting_fcn f)
 
static void set_filename_quote_characters (const std::string &s)
 
static void set_initial_input (const std::string &text)
 
static void set_input_stream (FILE *f)
 
static void set_name (const std::string &n)
 
static void set_output_stream (FILE *f)
 
static void set_quoting_function (quoting_fcn f)
 
static void set_screen_size (int ht, int wd)
 
static void set_user_accept_line_function (user_accept_line_fcn f)
 
static int terminal_cols (void)
 
static int terminal_rows (void)
 
static bool undo (void)
 

Protected Member Functions

virtual void do_blink_matching_paren (bool)
 
virtual void do_clear_screen (bool)
 
virtual void do_clear_undo_list (void)
 
virtual std::string do_decode_prompt_string (const std::string &)
 
virtual bool do_erase_empty_line (bool)
 
bool do_event_loop_interrupted (void) const
 
virtual bool do_filename_completion_desired (bool)
 
virtual bool do_filename_quoting_desired (bool)
 
virtual char_is_quoted_fcn do_get_char_is_quoted_function (void) const
 
virtual completion_fcn do_get_completion_function (void) const
 
virtual dequoting_fcn do_get_dequoting_function (void) const
 
virtual quoting_fcn do_get_quoting_function (void) const
 
virtual user_accept_line_fcn do_get_user_accept_line_function (void) const
 
virtual void do_handle_interrupt_signal (void)
 
int do_insert_initial_input (void)
 
virtual void do_interrupt (bool)
 
void do_interrupt_event_loop (bool arg)
 
virtual bool do_prefer_env_winsize (bool)
 
virtual void do_re_read_init_file (void)
 
virtual void do_read_init_file (const std::string &)
 
std::string do_readline (const std::string &prompt)
 
virtual void do_redisplay (void)
 
virtual void do_resize_terminal (void)
 
virtual void do_restore_terminal_state (void)
 
virtual void do_set_basic_quote_characters (const std::string &)
 
virtual void do_set_basic_word_break_characters (const std::string &)
 
virtual void do_set_char_is_quoted_function (char_is_quoted_fcn)
 
virtual void do_set_completer_quote_characters (const std::string &)
 
virtual void do_set_completer_word_break_characters (const std::string &)
 
virtual void do_set_completer_word_break_hook (completion_hook_fcn)
 
virtual void do_set_completion_append_character (char)
 
virtual void do_set_completion_function (completion_fcn)
 
virtual void do_set_dequoting_function (dequoting_fcn)
 
virtual void do_set_filename_quote_characters (const std::string &)
 
virtual void do_set_name (const std::string &)
 
virtual void do_set_quoting_function (quoting_fcn)
 
virtual void do_set_screen_size (int ht, int wd)
 
virtual void do_set_user_accept_line_function (user_accept_line_fcn)
 
virtual int do_terminal_cols (void)
 
virtual int do_terminal_rows (void)
 
virtual bool do_undo (void)
 
void error (const std::string &)
 
void error (int)
 
virtual std::string newline_chars (void)
 
int read_octal (const std::string &s)
 
virtual void restore_event_hook (void)
 
virtual void restore_pre_input_hook (void)
 
virtual void restore_startup_hook (void)
 
virtual void set_event_hook (event_hook_fcn)
 
virtual void set_pre_input_hook (pre_input_hook_fcn)
 
virtual void set_startup_hook (startup_hook_fcn)
 

Protected Attributes

int m_cols
 
int m_command_number
 
std::string m_initial_input
 
bool m_interrupt_event_loop
 
bool m_interrupted
 
int m_rows
 

Static Private Member Functions

static void cleanup_instance (void)
 
static int event_handler (void)
 
static void handle_interrupt_signal (void)
 
static bool instance_ok (void)
 
static void make_command_editor (void)
 
static int pre_input_handler (void)
 
static int startup_handler (void)
 

Private Attributes

FILE * m_input_stream
 
FILE * m_output_stream
 

Static Private Attributes

static std::set< event_hook_fcnm_event_hook_set
 
static std::set< pre_input_hook_fcnm_pre_input_hook_set
 
static std::set< startup_hook_fcnm_startup_hook_set
 
static command_editors_instance = nullptr
 

Detailed Description

Definition at line 931 of file cmd-edit.cc.

Member Typedef Documentation

◆ char_is_quoted_fcn

typedef int(* command_editor::char_is_quoted_fcn) (const std::string &, int)
inherited

Definition at line 67 of file cmd-edit.h.

◆ completion_fcn

typedef std::string(* command_editor::completion_fcn) (const std::string &, int)
inherited

Definition at line 59 of file cmd-edit.h.

◆ completion_hook_fcn

typedef char*(* command_editor::completion_hook_fcn) ()
inherited

Definition at line 61 of file cmd-edit.h.

◆ dequoting_fcn

typedef std::string(* command_editor::dequoting_fcn) (const std::string &, int)
inherited

Definition at line 65 of file cmd-edit.h.

◆ event_hook_fcn

typedef int(* command_editor::event_hook_fcn) (void)
inherited

Definition at line 57 of file cmd-edit.h.

◆ pre_input_hook_fcn

typedef int(* command_editor::pre_input_hook_fcn) (void)
inherited

Definition at line 55 of file cmd-edit.h.

◆ quoting_fcn

typedef std::string(* command_editor::quoting_fcn) (const std::string &, int, char)
inherited

Definition at line 63 of file cmd-edit.h.

◆ startup_hook_fcn

typedef int(* command_editor::startup_hook_fcn) (void)
inherited

Definition at line 53 of file cmd-edit.h.

◆ user_accept_line_fcn

typedef void(* command_editor::user_accept_line_fcn) (const std::string &)
inherited

Definition at line 69 of file cmd-edit.h.

Constructor & Destructor Documentation

◆ default_command_editor() [1/2]

default_command_editor::default_command_editor ( void  )
inline

Definition at line 936 of file cmd-edit.cc.

◆ default_command_editor() [2/2]

default_command_editor::default_command_editor ( const default_command_editor )
delete

◆ ~default_command_editor()

default_command_editor::~default_command_editor ( void  )
default

Member Function Documentation

◆ accept_line()

◆ add_event_hook()

void command_editor::add_event_hook ( event_hook_fcn  f)
staticinherited

◆ add_pre_input_hook()

◆ add_startup_hook()

◆ blink_matching_paren()

void command_editor::blink_matching_paren ( bool  flag)
staticinherited

◆ cleanup_instance()

static void command_editor::cleanup_instance ( void  )
inlinestaticprivateinherited

Definition at line 222 of file cmd-edit.h.

Referenced by command_editor::instance_ok().

◆ clear_screen()

void command_editor::clear_screen ( bool  skip_redisplay = false)
staticinherited

◆ clear_undo_list()

void command_editor::clear_undo_list ( void  )
staticinherited

◆ current_command_number()

int command_editor::current_command_number ( void  )
staticinherited

◆ decode_prompt_string()

◆ do_accept_line()

void default_command_editor::do_accept_line ( void  )
virtual

Implements command_editor.

Definition at line 1066 of file cmd-edit.cc.

◆ do_blink_matching_paren()

virtual void command_editor::do_blink_matching_paren ( bool  )
inlineprotectedvirtualinherited

Definition at line 285 of file cmd-edit.h.

Referenced by command_editor::blink_matching_paren().

◆ do_clear_screen()

virtual void command_editor::do_clear_screen ( bool  )
inlineprotectedvirtualinherited

Definition at line 269 of file cmd-edit.h.

Referenced by command_editor::clear_screen().

◆ do_clear_undo_list()

virtual void command_editor::do_clear_undo_list ( void  )
inlineprotectedvirtualinherited

Definition at line 350 of file cmd-edit.h.

Referenced by command_editor::clear_undo_list().

◆ do_decode_prompt_string()

std::string command_editor::do_decode_prompt_string ( const std::string &  s)
protectedvirtualinherited

◆ do_erase_empty_line()

virtual bool command_editor::do_erase_empty_line ( bool  )
inlineprotectedvirtualinherited

Definition at line 287 of file cmd-edit.h.

Referenced by command_editor::erase_empty_line().

◆ do_event_loop_interrupted()

bool command_editor::do_event_loop_interrupted ( void  ) const
inlineprotectedinherited

Definition at line 380 of file cmd-edit.h.

Referenced by command_editor::event_loop_interrupted().

◆ do_filename_completion_desired()

virtual bool command_editor::do_filename_completion_desired ( bool  )
inlineprotectedvirtualinherited

Definition at line 368 of file cmd-edit.h.

Referenced by command_editor::filename_completion_desired().

◆ do_filename_quoting_desired()

virtual bool command_editor::do_filename_quoting_desired ( bool  )
inlineprotectedvirtualinherited

Definition at line 370 of file cmd-edit.h.

Referenced by command_editor::filename_quoting_desired().

◆ do_generate_filename_completions()

string_vector default_command_editor::do_generate_filename_completions ( const std::string &  text)
virtual

Implements command_editor.

Definition at line 1016 of file cmd-edit.cc.

◆ do_get_char_is_quoted_function()

virtual char_is_quoted_fcn command_editor::do_get_char_is_quoted_function ( void  ) const
inlineprotectedvirtualinherited

Definition at line 322 of file cmd-edit.h.

Referenced by command_editor::get_char_is_quoted_function().

◆ do_get_completion_function()

virtual completion_fcn command_editor::do_get_completion_function ( void  ) const
inlineprotectedvirtualinherited

Definition at line 313 of file cmd-edit.h.

Referenced by command_editor::get_completion_function().

◆ do_get_current_line()

std::string default_command_editor::do_get_current_line ( void  ) const
virtual

Implements command_editor.

Definition at line 1029 of file cmd-edit.cc.

◆ do_get_dequoting_function()

virtual dequoting_fcn command_editor::do_get_dequoting_function ( void  ) const
inlineprotectedvirtualinherited

Definition at line 319 of file cmd-edit.h.

Referenced by command_editor::get_dequoting_function().

◆ do_get_input_stream()

FILE * default_command_editor::do_get_input_stream ( void  )
virtual

Implements command_editor.

Definition at line 998 of file cmd-edit.cc.

References m_input_stream.

◆ do_get_line_buffer()

std::string default_command_editor::do_get_line_buffer ( void  ) const
virtual

Implements command_editor.

Definition at line 1023 of file cmd-edit.cc.

◆ do_get_output_stream()

FILE * default_command_editor::do_get_output_stream ( void  )
virtual

Implements command_editor.

Definition at line 1010 of file cmd-edit.cc.

References m_output_stream.

◆ do_get_prev_char()

char default_command_editor::do_get_prev_char ( int  ) const
virtual

Implements command_editor.

Definition at line 1036 of file cmd-edit.cc.

◆ do_get_quoting_function()

virtual quoting_fcn command_editor::do_get_quoting_function ( void  ) const
inlineprotectedvirtualinherited

Definition at line 316 of file cmd-edit.h.

Referenced by command_editor::get_quoting_function().

◆ do_get_user_accept_line_function()

virtual user_accept_line_fcn command_editor::do_get_user_accept_line_function ( void  ) const
inlineprotectedvirtualinherited

Definition at line 325 of file cmd-edit.h.

Referenced by command_editor::get_user_accept_line_function().

◆ do_handle_interrupt_signal()

virtual void command_editor::do_handle_interrupt_signal ( void  )
inlineprotectedvirtualinherited

Definition at line 376 of file cmd-edit.h.

Referenced by command_editor::handle_interrupt_signal().

◆ do_insert_initial_input()

int command_editor::do_insert_initial_input ( void  )
protectedinherited

◆ do_insert_text()

void default_command_editor::do_insert_text ( const std::string &  text)
virtual

Implements command_editor.

Definition at line 1054 of file cmd-edit.cc.

◆ do_interrupt()

virtual void command_editor::do_interrupt ( bool  )
inlineprotectedvirtualinherited

Definition at line 374 of file cmd-edit.h.

Referenced by command_editor::interrupt().

◆ do_interrupt_event_loop()

void command_editor::do_interrupt_event_loop ( bool  arg)
inlineprotectedinherited

Definition at line 378 of file cmd-edit.h.

Referenced by command_editor::interrupt_event_loop().

◆ do_kill_full_line()

void default_command_editor::do_kill_full_line ( void  )
virtual

Implements command_editor.

Definition at line 1048 of file cmd-edit.cc.

◆ do_newline()

void default_command_editor::do_newline ( void  )
virtual

Implements command_editor.

Definition at line 1060 of file cmd-edit.cc.

◆ do_prefer_env_winsize()

virtual bool command_editor::do_prefer_env_winsize ( bool  )
inlineprotectedvirtualinherited

Definition at line 372 of file cmd-edit.h.

Referenced by command_editor::prefer_env_winsize().

◆ do_re_read_init_file()

virtual void command_editor::do_re_read_init_file ( void  )
inlineprotectedvirtualinherited

Definition at line 366 of file cmd-edit.h.

Referenced by command_editor::re_read_init_file().

◆ do_read_init_file()

virtual void command_editor::do_read_init_file ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 364 of file cmd-edit.h.

Referenced by command_editor::read_init_file().

◆ do_readline() [1/2]

std::string command_editor::do_readline ( const std::string &  prompt)
inlineprotectedinherited

Definition at line 246 of file cmd-edit.h.

Referenced by command_editor::readline().

◆ do_readline() [2/2]

std::string default_command_editor::do_readline ( const std::string &  prompt,
bool &  eof 
)
virtual

Implements command_editor.

Definition at line 983 of file cmd-edit.cc.

References fgetl(), m_input_stream, and m_output_stream.

◆ do_redisplay()

virtual void command_editor::do_redisplay ( void  )
inlineprotectedvirtualinherited

◆ do_replace_line()

void default_command_editor::do_replace_line ( const std::string &  text,
bool  clear_undo 
)
virtual

Implements command_editor.

Definition at line 1042 of file cmd-edit.cc.

◆ do_resize_terminal()

virtual void command_editor::do_resize_terminal ( void  )
inlineprotectedvirtualinherited

Definition at line 271 of file cmd-edit.h.

Referenced by command_editor::resize_terminal().

◆ do_restore_terminal_state()

virtual void command_editor::do_restore_terminal_state ( void  )
inlineprotectedvirtualinherited

Definition at line 283 of file cmd-edit.h.

Referenced by command_editor::restore_terminal_state().

◆ do_set_basic_quote_characters()

virtual void command_editor::do_set_basic_quote_characters ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 295 of file cmd-edit.h.

Referenced by command_editor::set_basic_quote_characters().

◆ do_set_basic_word_break_characters()

virtual void command_editor::do_set_basic_word_break_characters ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 289 of file cmd-edit.h.

Referenced by command_editor::set_basic_word_break_characters().

◆ do_set_char_is_quoted_function()

virtual void command_editor::do_set_char_is_quoted_function ( char_is_quoted_fcn  )
inlineprotectedvirtualinherited

Definition at line 309 of file cmd-edit.h.

Referenced by command_editor::set_char_is_quoted_function().

◆ do_set_completer_quote_characters()

virtual void command_editor::do_set_completer_quote_characters ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 299 of file cmd-edit.h.

Referenced by command_editor::set_completer_quote_characters().

◆ do_set_completer_word_break_characters()

virtual void command_editor::do_set_completer_word_break_characters ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 291 of file cmd-edit.h.

Referenced by command_editor::set_completer_word_break_characters().

◆ do_set_completer_word_break_hook()

virtual void command_editor::do_set_completer_word_break_hook ( completion_hook_fcn  )
inlineprotectedvirtualinherited

Definition at line 293 of file cmd-edit.h.

◆ do_set_completion_append_character()

virtual void command_editor::do_set_completion_append_character ( char  )
inlineprotectedvirtualinherited

Definition at line 301 of file cmd-edit.h.

Referenced by command_editor::set_completion_append_character().

◆ do_set_completion_function()

virtual void command_editor::do_set_completion_function ( completion_fcn  )
inlineprotectedvirtualinherited

Definition at line 303 of file cmd-edit.h.

Referenced by command_editor::set_completion_function().

◆ do_set_dequoting_function()

virtual void command_editor::do_set_dequoting_function ( dequoting_fcn  )
inlineprotectedvirtualinherited

Definition at line 307 of file cmd-edit.h.

Referenced by command_editor::set_dequoting_function().

◆ do_set_filename_quote_characters()

virtual void command_editor::do_set_filename_quote_characters ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 297 of file cmd-edit.h.

Referenced by command_editor::set_filename_quote_characters().

◆ do_set_input_stream()

void default_command_editor::do_set_input_stream ( FILE *  f)
virtual

Implements command_editor.

Definition at line 992 of file cmd-edit.cc.

References f, and m_input_stream.

◆ do_set_name()

virtual void command_editor::do_set_name ( const std::string &  )
inlineprotectedvirtualinherited

Definition at line 244 of file cmd-edit.h.

Referenced by command_editor::set_name().

◆ do_set_output_stream()

void default_command_editor::do_set_output_stream ( FILE *  f)
virtual

Implements command_editor.

Definition at line 1004 of file cmd-edit.cc.

References f, and m_output_stream.

◆ do_set_quoting_function()

virtual void command_editor::do_set_quoting_function ( quoting_fcn  )
inlineprotectedvirtualinherited

Definition at line 305 of file cmd-edit.h.

Referenced by command_editor::set_quoting_function().

◆ do_set_screen_size()

virtual void command_editor::do_set_screen_size ( int  ht,
int  wd 
)
inlineprotectedvirtualinherited

Definition at line 273 of file cmd-edit.h.

Referenced by command_editor::set_screen_size().

◆ do_set_user_accept_line_function()

virtual void command_editor::do_set_user_accept_line_function ( user_accept_line_fcn  )
inlineprotectedvirtualinherited

Definition at line 311 of file cmd-edit.h.

Referenced by command_editor::set_user_accept_line_function().

◆ do_terminal_cols()

virtual int command_editor::do_terminal_cols ( void  )
inlineprotectedvirtualinherited

Definition at line 267 of file cmd-edit.h.

Referenced by command_editor::terminal_cols().

◆ do_terminal_rows()

virtual int command_editor::do_terminal_rows ( void  )
inlineprotectedvirtualinherited

Definition at line 265 of file cmd-edit.h.

Referenced by command_editor::terminal_rows().

◆ do_undo()

virtual bool command_editor::do_undo ( void  )
inlineprotectedvirtualinherited

Definition at line 348 of file cmd-edit.h.

Referenced by command_editor::undo().

◆ erase_empty_line()

bool command_editor::erase_empty_line ( bool  flag)
staticinherited

◆ error() [1/2]

void command_editor::error ( const std::string &  s)
protectedinherited

Definition at line 1964 of file cmd-edit.cc.

◆ error() [2/2]

void command_editor::error ( int  err_num)
protectedinherited

Definition at line 1958 of file cmd-edit.cc.

◆ event_handler()

int command_editor::event_handler ( void  )
staticprivateinherited

◆ event_loop_interrupted()

bool command_editor::event_loop_interrupted ( void  )
staticinherited

◆ filename_completion_desired()

bool command_editor::filename_completion_desired ( bool  arg)
staticinherited

◆ filename_quoting_desired()

bool command_editor::filename_quoting_desired ( bool  arg)
staticinherited

◆ force_default_editor()

void command_editor::force_default_editor ( void  )
staticinherited

Definition at line 1106 of file cmd-edit.cc.

References command_editor::s_instance.

Referenced by input_system::initialize().

◆ generate_filename_completions()

string_vector command_editor::generate_filename_completions ( const std::string &  text)
staticinherited

◆ get_char_is_quoted_function()

command_editor::char_is_quoted_fcn command_editor::get_char_is_quoted_function ( void  )
staticinherited

◆ get_completion_function()

command_editor::completion_fcn command_editor::get_completion_function ( void  )
staticinherited

◆ get_current_line()

std::string command_editor::get_current_line ( void  )
staticinherited

◆ get_dequoting_function()

command_editor::dequoting_fcn command_editor::get_dequoting_function ( void  )
staticinherited

◆ get_input_stream()

FILE * command_editor::get_input_stream ( void  )
staticinherited

◆ get_line_buffer()

std::string command_editor::get_line_buffer ( void  )
staticinherited

◆ get_output_stream()

FILE * command_editor::get_output_stream ( void  )
staticinherited

◆ get_prev_char()

char command_editor::get_prev_char ( int  offset)
staticinherited

◆ get_quoting_function()

command_editor::quoting_fcn command_editor::get_quoting_function ( void  )
staticinherited

◆ get_user_accept_line_function()

command_editor::user_accept_line_fcn command_editor::get_user_accept_line_function ( void  )
staticinherited

◆ handle_interrupt_signal()

void command_editor::handle_interrupt_signal ( void  )
staticprivateinherited

◆ increment_current_command_number()

void command_editor::increment_current_command_number ( void  )
staticinherited

◆ insert_initial_input()

int command_editor::insert_initial_input ( void  )
staticinherited

◆ insert_text()

void command_editor::insert_text ( const std::string &  text)
staticinherited

◆ instance_ok()

bool command_editor::instance_ok ( void  )
staticprivateinherited

Definition at line 1072 of file cmd-edit.cc.

References singleton_cleanup_list::add(), command_editor::cleanup_instance(), command_editor::event_handler(), command_editor::make_command_editor(), command_editor::s_instance, and command_editor::set_event_hook().

Referenced by command_editor::accept_line(), command_editor::add_pre_input_hook(), command_editor::add_startup_hook(), command_editor::blink_matching_paren(), command_editor::clear_screen(), command_editor::clear_undo_list(), command_editor::current_command_number(), command_editor::decode_prompt_string(), command_editor::erase_empty_line(), command_editor::event_loop_interrupted(), command_editor::filename_completion_desired(), command_editor::filename_quoting_desired(), command_editor::generate_filename_completions(), command_editor::get_char_is_quoted_function(), command_editor::get_completion_function(), command_editor::get_current_line(), command_editor::get_dequoting_function(), command_editor::get_input_stream(), command_editor::get_line_buffer(), command_editor::get_output_stream(), command_editor::get_prev_char(), command_editor::get_quoting_function(), command_editor::get_user_accept_line_function(), command_editor::handle_interrupt_signal(), command_editor::increment_current_command_number(), command_editor::insert_initial_input(), command_editor::insert_text(), command_editor::interrupt(), command_editor::interrupt_event_loop(), command_editor::kill_full_line(), command_editor::newline(), command_editor::prefer_env_winsize(), command_editor::re_read_init_file(), command_editor::read_init_file(), command_editor::readline(), command_editor::redisplay(), command_editor::remove_pre_input_hook(), command_editor::remove_startup_hook(), command_editor::replace_line(), command_editor::reset_current_command_number(), command_editor::resize_terminal(), command_editor::restore_terminal_state(), command_editor::set_basic_quote_characters(), command_editor::set_basic_word_break_characters(), command_editor::set_char_is_quoted_function(), command_editor::set_completer_quote_characters(), command_editor::set_completer_word_break_characters(), command_editor::set_completion_append_character(), command_editor::set_completion_function(), command_editor::set_dequoting_function(), command_editor::set_filename_quote_characters(), command_editor::set_initial_input(), command_editor::set_input_stream(), command_editor::set_name(), command_editor::set_output_stream(), command_editor::set_quoting_function(), command_editor::set_screen_size(), command_editor::set_user_accept_line_function(), command_editor::terminal_cols(), command_editor::terminal_rows(), and command_editor::undo().

◆ interrupt()

◆ interrupt_event_loop()

◆ kill_full_line()

void command_editor::kill_full_line ( void  )
staticinherited

◆ make_command_editor()

void command_editor::make_command_editor ( void  )
staticprivateinherited

Definition at line 1096 of file cmd-edit.cc.

References command_editor::s_instance.

Referenced by command_editor::instance_ok().

◆ newline()

void command_editor::newline ( void  )
staticinherited

◆ newline_chars()

virtual std::string command_editor::newline_chars ( void  )
inlineprotectedvirtualinherited

Definition at line 281 of file cmd-edit.h.

Referenced by command_editor::do_decode_prompt_string().

◆ operator=()

default_command_editor& default_command_editor::operator= ( const default_command_editor )
delete

◆ pre_input_handler()

int command_editor::pre_input_handler ( void  )
staticprivateinherited

Definition at line 1143 of file cmd-edit.cc.

References f, and command_editor::m_pre_input_hook_set.

Referenced by command_editor::add_pre_input_hook().

◆ prefer_env_winsize()

bool command_editor::prefer_env_winsize ( bool  arg)
staticinherited

◆ re_read_init_file()

void command_editor::re_read_init_file ( void  )
staticinherited

◆ read_init_file()

void command_editor::read_init_file ( const std::string &  file = "")
staticinherited

◆ read_octal()

int command_editor::read_octal ( const std::string &  s)
protectedinherited

Definition at line 1936 of file cmd-edit.cc.

Referenced by command_editor::do_decode_prompt_string().

◆ readline() [1/2]

std::string command_editor::readline ( const std::string &  prompt)
staticinherited

Definition at line 1188 of file cmd-edit.cc.

◆ readline() [2/2]

std::string command_editor::readline ( const std::string &  prompt,
bool &  eof 
)
staticinherited

◆ redisplay()

◆ remove_event_hook()

void command_editor::remove_event_hook ( event_hook_fcn  f)
staticinherited

Definition at line 1569 of file cmd-edit.cc.

References event_hook_lock, f, and command_editor::m_event_hook_set.

◆ remove_pre_input_hook()

void command_editor::remove_pre_input_hook ( pre_input_hook_fcn  f)
staticinherited

◆ remove_startup_hook()

void command_editor::remove_startup_hook ( startup_hook_fcn  f)
staticinherited

◆ replace_line()

void command_editor::replace_line ( const std::string &  text,
bool  clear_undo = true 
)
staticinherited

◆ reset_current_command_number()

void command_editor::reset_current_command_number ( int  n)
staticinherited

◆ resize_terminal()

void command_editor::resize_terminal ( void  )
staticinherited

◆ restore_event_hook()

virtual void command_editor::restore_event_hook ( void  )
inlineprotectedvirtualinherited

Definition at line 362 of file cmd-edit.h.

◆ restore_pre_input_hook()

virtual void command_editor::restore_pre_input_hook ( void  )
inlineprotectedvirtualinherited

Definition at line 358 of file cmd-edit.h.

Referenced by command_editor::remove_pre_input_hook().

◆ restore_startup_hook()

virtual void command_editor::restore_startup_hook ( void  )
inlineprotectedvirtualinherited

Definition at line 354 of file cmd-edit.h.

Referenced by command_editor::remove_startup_hook().

◆ restore_terminal_state()

void command_editor::restore_terminal_state ( void  )
staticinherited

◆ run_event_hooks()

void command_editor::run_event_hooks ( void  )
staticinherited

Definition at line 1581 of file cmd-edit.cc.

References command_editor::event_handler().

Referenced by debugger::server_loop(), and tree_evaluator::server_loop().

◆ set_basic_quote_characters()

void command_editor::set_basic_quote_characters ( const std::string &  s)
staticinherited

◆ set_basic_word_break_characters()

void command_editor::set_basic_word_break_characters ( const std::string &  s)
staticinherited

◆ set_char_is_quoted_function()

void command_editor::set_char_is_quoted_function ( char_is_quoted_fcn  f)
staticinherited

◆ set_completer_quote_characters()

void command_editor::set_completer_quote_characters ( const std::string &  s)
staticinherited

◆ set_completer_word_break_characters()

void command_editor::set_completer_word_break_characters ( const std::string &  s)
staticinherited

◆ set_completion_append_character()

void command_editor::set_completion_append_character ( char  c)
staticinherited

◆ set_completion_function()

void command_editor::set_completion_function ( completion_fcn  f)
staticinherited

◆ set_dequoting_function()

void command_editor::set_dequoting_function ( dequoting_fcn  f)
staticinherited

◆ set_event_hook()

virtual void command_editor::set_event_hook ( event_hook_fcn  )
inlineprotectedvirtualinherited

Definition at line 360 of file cmd-edit.h.

Referenced by command_editor::instance_ok().

◆ set_filename_quote_characters()

void command_editor::set_filename_quote_characters ( const std::string &  s)
staticinherited

◆ set_initial_input()

void command_editor::set_initial_input ( const std::string &  text)
staticinherited

◆ set_input_stream()

void command_editor::set_input_stream ( FILE *  f)
staticinherited

◆ set_name()

void command_editor::set_name ( const std::string &  n)
staticinherited

◆ set_output_stream()

void command_editor::set_output_stream ( FILE *  f)
staticinherited

◆ set_pre_input_hook()

virtual void command_editor::set_pre_input_hook ( pre_input_hook_fcn  )
inlineprotectedvirtualinherited

Definition at line 356 of file cmd-edit.h.

Referenced by command_editor::add_pre_input_hook().

◆ set_quoting_function()

void command_editor::set_quoting_function ( quoting_fcn  f)
staticinherited

◆ set_screen_size()

void command_editor::set_screen_size ( int  ht,
int  wd 
)
staticinherited

◆ set_startup_hook()

virtual void command_editor::set_startup_hook ( startup_hook_fcn  )
inlineprotectedvirtualinherited

Definition at line 352 of file cmd-edit.h.

Referenced by command_editor::add_startup_hook().

◆ set_user_accept_line_function()

void command_editor::set_user_accept_line_function ( user_accept_line_fcn  f)
staticinherited

◆ startup_handler()

int command_editor::startup_handler ( void  )
staticprivateinherited

Definition at line 1126 of file cmd-edit.cc.

References f, and command_editor::m_startup_hook_set.

Referenced by command_editor::add_startup_hook().

◆ terminal_cols()

int command_editor::terminal_cols ( void  )
staticinherited

◆ terminal_rows()

int command_editor::terminal_rows ( void  )
staticinherited

◆ undo()

bool command_editor::undo ( void  )
staticinherited

Member Data Documentation

◆ m_cols

int command_editor::m_cols
protectedinherited

Definition at line 395 of file cmd-edit.h.

◆ m_command_number

◆ m_event_hook_set

std::set< command_editor::event_hook_fcn > command_editor::m_event_hook_set
staticprivateinherited

◆ m_initial_input

std::string command_editor::m_initial_input
protectedinherited

◆ m_input_stream

FILE* default_command_editor::m_input_stream
private

Definition at line 977 of file cmd-edit.cc.

Referenced by do_get_input_stream(), do_readline(), and do_set_input_stream().

◆ m_interrupt_event_loop

bool command_editor::m_interrupt_event_loop
protectedinherited

Definition at line 399 of file cmd-edit.h.

◆ m_interrupted

bool command_editor::m_interrupted
protectedinherited

Definition at line 397 of file cmd-edit.h.

Referenced by command_editor::interrupt().

◆ m_output_stream

FILE* default_command_editor::m_output_stream
private

Definition at line 979 of file cmd-edit.cc.

Referenced by do_get_output_stream(), do_readline(), and do_set_output_stream().

◆ m_pre_input_hook_set

std::set< command_editor::pre_input_hook_fcn > command_editor::m_pre_input_hook_set
staticprivateinherited

◆ m_rows

int command_editor::m_rows
protectedinherited

Definition at line 394 of file cmd-edit.h.

◆ m_startup_hook_set

std::set< command_editor::startup_hook_fcn > command_editor::m_startup_hook_set
staticprivateinherited

◆ s_instance

command_editor * command_editor::s_instance = nullptr
staticprivateinherited

Definition at line 232 of file cmd-edit.h.

Referenced by command_editor::accept_line(), command_editor::add_pre_input_hook(), command_editor::add_startup_hook(), command_editor::blink_matching_paren(), command_editor::clear_screen(), command_editor::clear_undo_list(), command_editor::current_command_number(), command_editor::decode_prompt_string(), command_editor::erase_empty_line(), command_editor::event_loop_interrupted(), command_editor::filename_completion_desired(), command_editor::filename_quoting_desired(), command_editor::force_default_editor(), command_editor::generate_filename_completions(), command_editor::get_char_is_quoted_function(), command_editor::get_completion_function(), command_editor::get_current_line(), command_editor::get_dequoting_function(), command_editor::get_input_stream(), command_editor::get_line_buffer(), command_editor::get_output_stream(), command_editor::get_prev_char(), command_editor::get_quoting_function(), command_editor::get_user_accept_line_function(), command_editor::handle_interrupt_signal(), command_editor::increment_current_command_number(), command_editor::insert_initial_input(), command_editor::insert_text(), command_editor::instance_ok(), command_editor::interrupt(), command_editor::interrupt_event_loop(), command_editor::kill_full_line(), command_editor::make_command_editor(), command_editor::newline(), command_editor::prefer_env_winsize(), command_editor::re_read_init_file(), command_editor::read_init_file(), command_editor::readline(), command_editor::redisplay(), command_editor::remove_pre_input_hook(), command_editor::remove_startup_hook(), command_editor::replace_line(), command_editor::reset_current_command_number(), command_editor::resize_terminal(), command_editor::restore_terminal_state(), command_editor::set_basic_quote_characters(), command_editor::set_basic_word_break_characters(), command_editor::set_char_is_quoted_function(), command_editor::set_completer_quote_characters(), command_editor::set_completer_word_break_characters(), command_editor::set_completion_append_character(), command_editor::set_completion_function(), command_editor::set_dequoting_function(), command_editor::set_filename_quote_characters(), command_editor::set_initial_input(), command_editor::set_input_stream(), command_editor::set_name(), command_editor::set_output_stream(), command_editor::set_quoting_function(), command_editor::set_screen_size(), command_editor::set_user_accept_line_function(), command_editor::terminal_cols(), command_editor::terminal_rows(), and command_editor::undo().


The documentation for this class was generated from the following file: