Navigation

Operators and Keywords

Function List:

C++ API

command_editor Class Reference

#include <cmd-edit.h>

Inherited by default_command_editor.

Collaboration diagram for command_editor:

List of all members.


Public Types

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

Public Member Functions

virtual ~command_editor (void)

Static Public Member Functions

static void set_name (const std::string &n)
static std::string readline (const std::string &prompt)
static std::string readline (const std::string &prompt, bool &eof)
static void set_input_stream (FILE *f)
static FILE * get_input_stream (void)
static void set_output_stream (FILE *f)
static FILE * get_output_stream (void)
static int terminal_rows (void)
static int terminal_cols (void)
static void clear_screen (void)
static void resize_terminal (void)
static std::string decode_prompt_string (const std::string &s)
static void restore_terminal_state (void)
static void blink_matching_paren (bool flag)
static void set_basic_word_break_characters (const std::string &s)
static void set_completer_word_break_characters (const std::string &s)
static void set_basic_quote_characters (const std::string &s)
static void set_filename_quote_characters (const std::string &s)
static void set_completer_quote_characters (const std::string &s)
static void set_completion_append_character (char c)
static void set_completion_function (completion_fcn f)
static void set_quoting_function (quoting_fcn f)
static void set_dequoting_function (dequoting_fcn f)
static void set_char_is_quoted_function (char_is_quoted_fcn f)
static void set_user_accept_line_function (user_accept_line_fcn f)
static completion_fcn get_completion_function (void)
static quoting_fcn get_quoting_function (void)
static dequoting_fcn get_dequoting_function (void)
static char_is_quoted_fcn get_char_is_quoted_function (void)
static user_accept_line_fcn get_user_accept_line_function (void)
static string_vector generate_filename_completions (const std::string &text)
static std::string get_line_buffer (void)
static void insert_text (const std::string &text)
static void newline (void)
static void accept_line (void)
static void clear_undo_list (void)
static void add_startup_hook (startup_hook_fcn f)
static void remove_startup_hook (startup_hook_fcn f)
static void add_event_hook (event_hook_fcn f)
static void remove_event_hook (event_hook_fcn f)
static void read_init_file (const std::string &file=std::string())
static void re_read_init_file (void)
static bool filename_completion_desired (bool)
static bool filename_quoting_desired (bool)
static int current_command_number (void)
static void reset_current_command_number (int n)
static void increment_current_command_number (void)
static void force_default_editor (void)

Protected Member Functions

 command_editor (void)
virtual void do_set_name (const std::string &)
std::string do_readline (const std::string &prompt)
virtual std::string do_readline (const std::string &, bool &)=0
virtual void do_set_input_stream (FILE *)=0
virtual FILE * do_get_input_stream (void)=0
virtual void do_set_output_stream (FILE *)=0
virtual FILE * do_get_output_stream (void)=0
virtual int do_terminal_rows (void)
virtual int do_terminal_cols (void)
virtual void do_clear_screen (void)
virtual void do_resize_terminal (void)
virtual std::string do_decode_prompt_string (const std::string &)
virtual std::string newline_chars (void)
virtual void do_restore_terminal_state (void)
virtual void do_blink_matching_paren (bool)
virtual void do_set_basic_word_break_characters (const std::string &)
virtual void do_set_completer_word_break_characters (const std::string &)
virtual void do_set_basic_quote_characters (const std::string &)
virtual void do_set_filename_quote_characters (const std::string &)
virtual void do_set_completer_quote_characters (const std::string &)
virtual void do_set_completion_append_character (char)
virtual void do_set_completion_function (completion_fcn)
virtual void do_set_quoting_function (quoting_fcn)
virtual void do_set_dequoting_function (dequoting_fcn)
virtual void do_set_char_is_quoted_function (char_is_quoted_fcn)
virtual void do_set_user_accept_line_function (user_accept_line_fcn)
virtual completion_fcn do_get_completion_function (void) const
virtual quoting_fcn do_get_quoting_function (void) const
virtual dequoting_fcn do_get_dequoting_function (void) const
virtual char_is_quoted_fcn do_get_char_is_quoted_function (void) const
virtual user_accept_line_fcn do_get_user_accept_line_function (void) const
virtual string_vector do_generate_filename_completions (const std::string &text)=0
virtual std::string do_get_line_buffer (void) const =0
virtual void do_insert_text (const std::string &)=0
virtual void do_newline (void)=0
virtual void do_accept_line (void)=0
virtual void do_clear_undo_list (void)
virtual void set_startup_hook (startup_hook_fcn)
virtual void restore_startup_hook (void)
virtual void set_event_hook (startup_hook_fcn)
virtual void restore_event_hook (void)
virtual void do_read_init_file (const std::string &)
virtual void do_re_read_init_file (void)
virtual bool do_filename_completion_desired (bool)
virtual bool do_filename_quoting_desired (bool)
int read_octal (const std::string &s)
void error (int)
void error (const std::string &)

Protected Attributes

int command_number

Member Typedef Documentation


Constructor & Destructor Documentation

command_editor::command_editor ( void   )  [inline, protected]

virtual command_editor::~command_editor ( void   )  [inline, virtual]


Member Function Documentation

void command_editor::accept_line ( void   )  [static]

void command_editor::add_event_hook ( event_hook_fcn  f  )  [static]

void command_editor::add_startup_hook ( startup_hook_fcn  f  )  [static]

void command_editor::blink_matching_paren ( bool  flag  )  [static]

void command_editor::clear_screen ( void   )  [static]

void command_editor::clear_undo_list ( void   )  [static]

int command_editor::current_command_number ( void   )  [static]

std::string command_editor::decode_prompt_string ( const std::string s  )  [static]

virtual void command_editor::do_accept_line ( void   )  [protected, pure virtual]

Implemented in default_command_editor.

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

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

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

std::string command_editor::do_decode_prompt_string ( const std::string s  )  [protected, virtual]

virtual bool command_editor::do_filename_completion_desired ( bool   )  [inline, protected, virtual]

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

virtual string_vector command_editor::do_generate_filename_completions ( const std::string text  )  [protected, pure virtual]

Implemented in default_command_editor.

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

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

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

virtual FILE* command_editor::do_get_input_stream ( void   )  [protected, pure virtual]

Implemented in default_command_editor.

virtual std::string command_editor::do_get_line_buffer ( void   )  const [protected, pure virtual]

Implemented in default_command_editor.

virtual FILE* command_editor::do_get_output_stream ( void   )  [protected, pure virtual]

Implemented in default_command_editor.

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

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

virtual void command_editor::do_insert_text ( const std::string  )  [protected, pure virtual]

Implemented in default_command_editor.

virtual void command_editor::do_newline ( void   )  [protected, pure virtual]

Implemented in default_command_editor.

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

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

virtual std::string command_editor::do_readline ( const std::string ,
bool  
) [protected, pure virtual]

Implemented in default_command_editor.

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

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

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

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

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

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

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

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

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

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

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

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

virtual void command_editor::do_set_input_stream ( FILE *   )  [protected, pure virtual]

Implemented in default_command_editor.

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

virtual void command_editor::do_set_output_stream ( FILE *   )  [protected, pure virtual]

Implemented in default_command_editor.

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

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

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

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

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

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

bool command_editor::filename_completion_desired ( bool  arg  )  [static]

bool command_editor::filename_quoting_desired ( bool  arg  )  [static]

void command_editor::force_default_editor ( void   )  [static]

string_vector command_editor::generate_filename_completions ( const std::string text  )  [static]

command_editor::char_is_quoted_fcn command_editor::get_char_is_quoted_function ( void   )  [static]

command_editor::completion_fcn command_editor::get_completion_function ( void   )  [static]

command_editor::dequoting_fcn command_editor::get_dequoting_function ( void   )  [static]

FILE * command_editor::get_input_stream ( void   )  [static]

std::string command_editor::get_line_buffer ( void   )  [static]

FILE * command_editor::get_output_stream ( void   )  [static]

command_editor::quoting_fcn command_editor::get_quoting_function ( void   )  [static]

command_editor::user_accept_line_fcn command_editor::get_user_accept_line_function ( void   )  [static]

void command_editor::increment_current_command_number ( void   )  [static]

void command_editor::insert_text ( const std::string text  )  [static]

void command_editor::newline ( void   )  [static]

virtual std::string command_editor::newline_chars ( void   )  [inline, protected, virtual]

void command_editor::re_read_init_file ( void   )  [static]

void command_editor::read_init_file ( const std::string file = std::string ()  )  [static]

int command_editor::read_octal ( const std::string s  )  [protected]

std::string command_editor::readline ( const std::string prompt,
bool eof 
) [static]

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

void command_editor::remove_event_hook ( event_hook_fcn  f  )  [static]

void command_editor::remove_startup_hook ( startup_hook_fcn  f  )  [static]

void command_editor::reset_current_command_number ( int  n  )  [static]

void command_editor::resize_terminal ( void   )  [static]

virtual void command_editor::restore_event_hook ( void   )  [inline, protected, virtual]

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

void command_editor::restore_terminal_state ( void   )  [static]

void command_editor::set_basic_quote_characters ( const std::string s  )  [static]

void command_editor::set_basic_word_break_characters ( const std::string s  )  [static]

void command_editor::set_char_is_quoted_function ( char_is_quoted_fcn  f  )  [static]

void command_editor::set_completer_quote_characters ( const std::string s  )  [static]

void command_editor::set_completer_word_break_characters ( const std::string s  )  [static]

void command_editor::set_completion_append_character ( char  c  )  [static]

void command_editor::set_completion_function ( completion_fcn  f  )  [static]

void command_editor::set_dequoting_function ( dequoting_fcn  f  )  [static]

virtual void command_editor::set_event_hook ( startup_hook_fcn   )  [inline, protected, virtual]

void command_editor::set_filename_quote_characters ( const std::string s  )  [static]

void command_editor::set_input_stream ( FILE *  f  )  [static]

void command_editor::set_name ( const std::string n  )  [static]

void command_editor::set_output_stream ( FILE *  f  )  [static]

void command_editor::set_quoting_function ( quoting_fcn  f  )  [static]

virtual void command_editor::set_startup_hook ( startup_hook_fcn   )  [inline, protected, virtual]

void command_editor::set_user_accept_line_function ( user_accept_line_fcn  f  )  [static]

int command_editor::terminal_cols ( void   )  [static]

int command_editor::terminal_rows ( void   )  [static]


Member Data Documentation


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