Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

default_command_editor Class Reference

Inheritance diagram for default_command_editor:
Inheritance graph
[legend]
Collaboration diagram for default_command_editor:
Collaboration graph
[legend]

List of all members.

Public Types

typedef int(* char_is_quoted_fcn )(const std::string &, int)
typedef std::string(* completion_fcn )(const std::string &, int)
typedef std::string(* dequoting_fcn )(const std::string &, int)
typedef int(* event_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 (void)
 ~default_command_editor (void)
void do_accept_line (void)
string_vector do_generate_filename_completions (const std::string &text)
FILE * do_get_input_stream (void)
std::string do_get_line_buffer (void) const
FILE * do_get_output_stream (void)
void do_insert_text (const std::string &)
void do_newline (void)
std::string do_readline (const std::string &prompt, bool &eof)
void do_set_input_stream (FILE *f)
void do_set_output_stream (FILE *f)

Static Public Member Functions

static void accept_line (void)
static void add_event_hook (event_hook_fcn f)
static void add_startup_hook (startup_hook_fcn f)
static void blink_matching_paren (bool flag)
static void clear_screen (void)
static void clear_undo_list (void)
static int current_command_number (void)
static std::string decode_prompt_string (const std::string &s)
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 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 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 void insert_text (const std::string &text)
static void newline (void)
static void re_read_init_file (void)
static void read_init_file (const std::string &file=std::string())
static std::string readline (const std::string &prompt)
static std::string readline (const std::string &prompt, bool &eof)
static void remove_event_hook (event_hook_fcn f)
static void remove_startup_hook (startup_hook_fcn f)
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_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_user_accept_line_function (user_accept_line_fcn f)
static int terminal_cols (void)
static int terminal_rows (void)

Protected Member Functions

virtual void do_blink_matching_paren (bool)
virtual void do_clear_screen (void)
virtual void do_clear_undo_list (void)
virtual std::string do_decode_prompt_string (const std::string &)
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_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_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_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_user_accept_line_function (user_accept_line_fcn)
virtual int do_terminal_cols (void)
virtual int do_terminal_rows (void)
void error (int)
void error (const std::string &)
virtual std::string newline_chars (void)
int read_octal (const std::string &s)
virtual void restore_event_hook (void)
virtual void restore_startup_hook (void)
virtual void set_event_hook (startup_hook_fcn)
virtual void set_startup_hook (startup_hook_fcn)

Protected Attributes

int command_number

Private Member Functions

 default_command_editor (const default_command_editor &)
default_command_editoroperator= (const default_command_editor &)

Private Attributes

FILE * input_stream
FILE * output_stream

Detailed Description

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


Member Typedef Documentation

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Constructor & Destructor Documentation

default_command_editor::default_command_editor ( void   )  [inline]

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

default_command_editor::~default_command_editor ( void   )  [inline]

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

default_command_editor::default_command_editor ( const default_command_editor  )  [private]

Member Function Documentation

void command_editor::accept_line ( void   )  [static, inherited]
void command_editor::add_event_hook ( event_hook_fcn  f  )  [static, inherited]
void command_editor::add_startup_hook ( startup_hook_fcn  f  )  [static, inherited]
void command_editor::blink_matching_paren ( bool  flag  )  [static, inherited]
void command_editor::clear_screen ( void   )  [static, inherited]
void command_editor::clear_undo_list ( void   )  [static, inherited]
int command_editor::current_command_number ( void   )  [static, inherited]
std::string command_editor::decode_prompt_string ( const std::string &  s  )  [static, inherited]
void default_command_editor::do_accept_line ( void   )  [virtual]

Implements command_editor.

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

virtual void command_editor::do_blink_matching_paren ( bool   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::blink_matching_paren().

virtual void command_editor::do_clear_screen ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::clear_screen().

virtual void command_editor::do_clear_undo_list ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::clear_undo_list().

std::string command_editor::do_decode_prompt_string ( const std::string &  s  )  [protected, virtual, inherited]
virtual bool command_editor::do_filename_completion_desired ( bool   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::filename_completion_desired().

virtual bool command_editor::do_filename_quoting_desired ( bool   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::filename_quoting_desired().

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

Implements command_editor.

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

virtual char_is_quoted_fcn command_editor::do_get_char_is_quoted_function ( void   )  const [inline, protected, virtual, inherited]

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

Referenced by command_editor::get_char_is_quoted_function().

virtual completion_fcn command_editor::do_get_completion_function ( void   )  const [inline, protected, virtual, inherited]

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

Referenced by command_editor::get_completion_function().

virtual dequoting_fcn command_editor::do_get_dequoting_function ( void   )  const [inline, protected, virtual, inherited]

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

Referenced by command_editor::get_dequoting_function().

FILE * default_command_editor::do_get_input_stream ( void   )  [virtual]

Implements command_editor.

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

References input_stream.

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

Implements command_editor.

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

FILE * default_command_editor::do_get_output_stream ( void   )  [virtual]

Implements command_editor.

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

References output_stream.

virtual quoting_fcn command_editor::do_get_quoting_function ( void   )  const [inline, protected, virtual, inherited]

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

Referenced by command_editor::get_quoting_function().

virtual user_accept_line_fcn command_editor::do_get_user_accept_line_function ( void   )  const [inline, protected, virtual, inherited]

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

Referenced by command_editor::get_user_accept_line_function().

void default_command_editor::do_insert_text ( const std::string &   )  [virtual]

Implements command_editor.

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

void default_command_editor::do_newline ( void   )  [virtual]

Implements command_editor.

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

virtual void command_editor::do_re_read_init_file ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::re_read_init_file().

virtual void command_editor::do_read_init_file ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::read_init_file().

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

Implements command_editor.

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

References input_stream, octave_fgetl(), and output_stream.

std::string command_editor::do_readline ( const std::string &  prompt  )  [inline, protected, inherited]

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

Referenced by command_editor::readline().

virtual void command_editor::do_resize_terminal ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::resize_terminal().

virtual void command_editor::do_restore_terminal_state ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::restore_terminal_state().

virtual void command_editor::do_set_basic_quote_characters ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_basic_quote_characters().

virtual void command_editor::do_set_basic_word_break_characters ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_basic_word_break_characters().

virtual void command_editor::do_set_char_is_quoted_function ( char_is_quoted_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_char_is_quoted_function().

virtual void command_editor::do_set_completer_quote_characters ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_completer_quote_characters().

virtual void command_editor::do_set_completer_word_break_characters ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_completer_word_break_characters().

virtual void command_editor::do_set_completion_append_character ( char   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_completion_append_character().

virtual void command_editor::do_set_completion_function ( completion_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_completion_function().

virtual void command_editor::do_set_dequoting_function ( dequoting_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_dequoting_function().

virtual void command_editor::do_set_filename_quote_characters ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_filename_quote_characters().

void default_command_editor::do_set_input_stream ( FILE *  f  )  [virtual]

Implements command_editor.

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

References input_stream.

virtual void command_editor::do_set_name ( const std::string &   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_name().

void default_command_editor::do_set_output_stream ( FILE *  f  )  [virtual]

Implements command_editor.

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

References output_stream.

virtual void command_editor::do_set_quoting_function ( quoting_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_quoting_function().

virtual void command_editor::do_set_user_accept_line_function ( user_accept_line_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::set_user_accept_line_function().

virtual int command_editor::do_terminal_cols ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::terminal_cols().

virtual int command_editor::do_terminal_rows ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::terminal_rows().

void command_editor::error ( int  err_num  )  [protected, inherited]

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

References current_liboctave_error_handler.

void command_editor::error ( const std::string &  s  )  [protected, inherited]

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

References current_liboctave_error_handler.

bool command_editor::filename_completion_desired ( bool  arg  )  [static, inherited]
bool command_editor::filename_quoting_desired ( bool  arg  )  [static, inherited]
void command_editor::force_default_editor ( void   )  [static, inherited]

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

References command_editor::instance.

Referenced by octave_main().

string_vector command_editor::generate_filename_completions ( const std::string &  text  )  [static, inherited]
command_editor::char_is_quoted_fcn command_editor::get_char_is_quoted_function ( void   )  [static, inherited]
command_editor::completion_fcn command_editor::get_completion_function ( void   )  [static, inherited]
command_editor::dequoting_fcn command_editor::get_dequoting_function ( void   )  [static, inherited]
FILE * command_editor::get_input_stream ( void   )  [static, inherited]
std::string command_editor::get_line_buffer ( void   )  [static, inherited]
FILE * command_editor::get_output_stream ( void   )  [static, inherited]
command_editor::quoting_fcn command_editor::get_quoting_function ( void   )  [static, inherited]
command_editor::user_accept_line_fcn command_editor::get_user_accept_line_function ( void   )  [static, inherited]
void command_editor::increment_current_command_number ( void   )  [static, inherited]
void command_editor::insert_text ( const std::string &  text  )  [static, inherited]
void command_editor::newline ( void   )  [static, inherited]
virtual std::string command_editor::newline_chars ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::do_decode_prompt_string().

default_command_editor& default_command_editor::operator= ( const default_command_editor  )  [private]
void command_editor::re_read_init_file ( void   )  [static, inherited]
void command_editor::read_init_file ( const std::string &  file = std::string ()  )  [static, inherited]
int command_editor::read_octal ( const std::string &  s  )  [protected, inherited]

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

Referenced by command_editor::do_decode_prompt_string().

std::string command_editor::readline ( const std::string &  prompt  )  [static, inherited]

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

Referenced by gnu_readline().

std::string command_editor::readline ( const std::string &  prompt,
bool eof 
) [static, inherited]
void command_editor::remove_event_hook ( event_hook_fcn  f  )  [static, inherited]
void command_editor::remove_startup_hook ( startup_hook_fcn  f  )  [static, inherited]
void command_editor::reset_current_command_number ( int  n  )  [static, inherited]
void command_editor::resize_terminal ( void   )  [static, inherited]
virtual void command_editor::restore_event_hook ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::remove_event_hook().

virtual void command_editor::restore_startup_hook ( void   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::remove_startup_hook().

void command_editor::restore_terminal_state ( void   )  [static, inherited]
void command_editor::run_event_hooks ( void   )  [static, inherited]

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

References command_editor::event_handler().

Referenced by DEFUN().

void command_editor::set_basic_quote_characters ( const std::string &  s  )  [static, inherited]
void command_editor::set_basic_word_break_characters ( const std::string &  s  )  [static, inherited]
void command_editor::set_char_is_quoted_function ( char_is_quoted_fcn  f  )  [static, inherited]
void command_editor::set_completer_quote_characters ( const std::string &  s  )  [static, inherited]
void command_editor::set_completer_word_break_characters ( const std::string &  s  )  [static, inherited]
void command_editor::set_completion_append_character ( char  c  )  [static, inherited]
void command_editor::set_completion_function ( completion_fcn  f  )  [static, inherited]
void command_editor::set_dequoting_function ( dequoting_fcn  f  )  [static, inherited]
virtual void command_editor::set_event_hook ( startup_hook_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::add_event_hook().

void command_editor::set_filename_quote_characters ( const std::string &  s  )  [static, inherited]
void command_editor::set_input_stream ( FILE *  f  )  [static, inherited]
void command_editor::set_name ( const std::string &  n  )  [static, inherited]
void command_editor::set_output_stream ( FILE *  f  )  [static, inherited]
void command_editor::set_quoting_function ( quoting_fcn  f  )  [static, inherited]
virtual void command_editor::set_startup_hook ( startup_hook_fcn   )  [inline, protected, virtual, inherited]

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

Referenced by command_editor::add_startup_hook().

void command_editor::set_user_accept_line_function ( user_accept_line_fcn  f  )  [static, inherited]
int command_editor::terminal_cols ( void   )  [static, inherited]
int command_editor::terminal_rows ( void   )  [static, inherited]

Member Data Documentation

int command_editor::command_number [protected, inherited]

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

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

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

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


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines