GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
octave_link Class Reference

#include "octave-link.h"

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

Public Types

typedef std::list< std::pair
< std::string, std::string > > 
filter_list

Public Member Functions

virtual ~octave_link (void)

Static Public Member Functions

static void append_history (const std::string &hist_entry)
static void change_directory (const std::string &dir)
static void clear_history (void)
static void clear_workspace (void)
static void connect_link (octave_link *)
static int debug_cd_or_addpath_error (const std::string &file, const std::string &dir, bool addpath_option)
static void discard_events (void)
static bool edit_file (const std::string &file)
static bool enabled (void)
static void enter_debugger_event (const std::string &file, int line)
static void entered_readline_hook (void)
static void execute_command_in_terminal (const std::string &command)
static void execute_in_debugger_event (const std::string &file, int line)
static bool exit (int status)
static void exit_debugger_event (void)
static std::list< std::string > file_dialog (const filter_list &filter, const std::string &title, const std::string &filename, const std::string &dirname, const std::string &multimode)
static void finished_readline_hook (void)
static void generate_events (void)
static std::list< std::string > input_dialog (const std::list< std::string > &prompt, const std::string &title, const std::list< float > &nr, const std::list< float > &nc, const std::list< std::string > &defaults)
static std::pair< std::list
< int >, int
list_dialog (const std::list< std::string > &list, const std::string &mode, int width, int height, const std::list< int > &initial_value, const std::string &name, const std::list< std::string > &prompt, const std::string &ok_string, const std::string &cancel_string)
static int message_dialog (const std::string &dlg, const std::string &msg, const std::string &title)
template<class T >
static void post_event (T *obj, void(T::*method)(void))
template<class T , class A >
static void post_event (T *obj, void(T::*method)(A), A arg)
template<class T , class A >
static void post_event (T *obj, void(T::*method)(const A &), const A &arg)
template<class T , class A , class B >
static void post_event (T *obj, void(T::*method)(const A &, const B &), const A &arg_a, const B &arg_b)
static void post_input_event (void)
static void pre_input_event (void)
static void process_events (bool disable=false)
static bool prompt_new_edit_file (const std::string &file)
static std::string question_dialog (const std::string &msg, const std::string &title, const std::string &btn1, const std::string &btn2, const std::string &btn3, const std::string &btndef)
static void set_default_prompts (std::string &ps1, std::string &ps2, std::string &ps4)
static void set_history (const string_vector &hist)
static void set_workspace (void)
static void set_workspace (bool top_level, const std::list< workspace_element > &ws)
static bool show_doc (const std::string &file)
static bool show_preferences ()
static void update_breakpoint (bool insert, const std::string &file, int line)

Protected Member Functions

 octave_link (void)
virtual void do_append_history (const std::string &hist_entry)=0
virtual void do_change_directory (const std::string &dir)=0
virtual void do_clear_history (void)=0
virtual void do_clear_workspace (void)=0
virtual int do_debug_cd_or_addpath_error (const std::string &file, const std::string &dir, bool addpath_option)=0
void do_discard_events (void)
virtual bool do_edit_file (const std::string &file)=0
virtual void do_enter_debugger_event (const std::string &file, int line)=0
void do_entered_readline_hook (void)
virtual void do_execute_command_in_terminal (const std::string &command)=0
virtual void do_execute_in_debugger_event (const std::string &file, int line)=0
virtual bool do_exit (int status)=0
virtual void do_exit_debugger_event (void)=0
virtual std::list< std::string > do_file_dialog (const filter_list &filter, const std::string &title, const std::string &filename, const std::string &dirname, const std::string &multimode)=0
void do_finished_readline_hook (void)
void do_generate_events (void)
virtual std::list< std::string > do_input_dialog (const std::list< std::string > &prompt, const std::string &title, const std::list< float > &nr, const std::list< float > &nc, const std::list< std::string > &defaults)=0
virtual std::pair< std::list
< int >, int
do_list_dialog (const std::list< std::string > &list, const std::string &mode, int width, int height, const std::list< int > &initial_value, const std::string &name, const std::list< std::string > &prompt, const std::string &ok_string, const std::string &cancel_string)=0
virtual int do_message_dialog (const std::string &dlg, const std::string &msg, const std::string &title)=0
template<class T >
void do_post_event (T *obj, void(T::*method)(void))
template<class T , class A >
void do_post_event (T *obj, void(T::*method)(A), A arg)
template<class T , class A >
void do_post_event (T *obj, void(T::*method)(const A &), const A &arg)
virtual void do_post_input_event (void)=0
virtual void do_pre_input_event (void)=0
void do_process_events (void)
virtual bool do_prompt_new_edit_file (const std::string &file)=0
virtual std::string do_question_dialog (const std::string &msg, const std::string &title, const std::string &btn1, const std::string &btn2, const std::string &btn3, const std::string &btndef)=0
virtual void do_set_default_prompts (std::string &ps1, std::string &ps2, std::string &ps4)=0
virtual void do_set_history (const string_vector &hist)=0
virtual void do_set_workspace (bool top_level, const std::list< workspace_element > &ws)=0
virtual void do_show_doc (const std::string &file)=0
virtual void do_show_preferences (void)=0
virtual void do_update_breakpoint (bool insert, const std::string &file, int line)=0

Protected Attributes

bool debugging
octave_mutexevent_queue_mutex
event_queue gui_event_queue
bool link_enabled

Private Member Functions

 octave_link (const octave_link &)
octave_linkoperator= (const octave_link &)

Static Private Member Functions

static bool instance_ok (void)

Static Private Attributes

static octave_linkinstance = 0

Detailed Description

Definition at line 44 of file octave-link.h.

Member Typedef Documentation

typedef std::list<std::pair<std::string, std::string> > octave_link::filter_list

Definition at line 190 of file octave-link.h.

Constructor & Destructor Documentation

octave_link::octave_link ( void  )
protected

Definition at line 51 of file octave-link.cc.

References command_editor::add_event_hook(), and octave_readline_hook().

virtual octave_link::~octave_link ( void  )
inlinevirtual

Definition at line 54 of file octave-link.h.

octave_link::octave_link ( const octave_link )
private

Member Function Documentation

static void octave_link::append_history ( const std::string &  hist_entry)
inlinestatic
static void octave_link::change_directory ( const std::string &  dir)
inlinestatic

Definition at line 213 of file octave-link.h.

Referenced by octave_change_to_directory().

static void octave_link::clear_history ( void  )
inlinestatic

Definition at line 253 of file octave-link.h.

Referenced by do_history().

static void octave_link::clear_workspace ( void  )
inlinestatic

Definition at line 235 of file octave-link.h.

Referenced by Fclear().

void octave_link::connect_link ( octave_link obj)
static

Definition at line 72 of file octave-link.cc.

References error(), and instance.

Referenced by main_window::construct_octave_qt_link().

static int octave_link::debug_cd_or_addpath_error ( const std::string &  file,
const std::string &  dir,
bool  addpath_option 
)
inlinestatic

Definition at line 204 of file octave-link.h.

Referenced by octave_qt_link::file_in_path().

static void octave_link::discard_events ( void  )
inlinestatic

Definition at line 76 of file octave-link.h.

virtual void octave_link::do_append_history ( const std::string &  hist_entry)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_change_directory ( const std::string &  dir)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_clear_history ( void  )
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_clear_workspace ( void  )
protectedpure virtual

Implemented in octave_qt_link.

virtual int octave_link::do_debug_cd_or_addpath_error ( const std::string &  file,
const std::string &  dir,
bool  addpath_option 
)
protectedpure virtual

Implemented in octave_qt_link.

void octave_link::do_discard_events ( void  )
protected
virtual bool octave_link::do_edit_file ( const std::string &  file)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_enter_debugger_event ( const std::string &  file,
int  line 
)
protectedpure virtual

Implemented in octave_qt_link.

void octave_link::do_entered_readline_hook ( void  )
inlineprotected

Definition at line 388 of file octave-link.h.

virtual void octave_link::do_execute_command_in_terminal ( const std::string &  command)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_execute_in_debugger_event ( const std::string &  file,
int  line 
)
protectedpure virtual

Implemented in octave_qt_link.

virtual bool octave_link::do_exit ( int  status)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_exit_debugger_event ( void  )
protectedpure virtual

Implemented in octave_qt_link.

virtual std::list<std::string> octave_link::do_file_dialog ( const filter_list filter,
const std::string &  title,
const std::string &  filename,
const std::string &  dirname,
const std::string &  multimode 
)
protectedpure virtual

Implemented in octave_qt_link.

void octave_link::do_finished_readline_hook ( void  )
inlineprotected

Definition at line 389 of file octave-link.h.

void octave_link::do_generate_events ( void  )
protected

Definition at line 81 of file octave-link.cc.

virtual std::list<std::string> octave_link::do_input_dialog ( const std::list< std::string > &  prompt,
const std::string &  title,
const std::list< float > &  nr,
const std::list< float > &  nc,
const std::list< std::string > &  defaults 
)
protectedpure virtual

Implemented in octave_qt_link.

virtual std::pair<std::list<int>, int> octave_link::do_list_dialog ( const std::list< std::string > &  list,
const std::string &  mode,
int  width,
int  height,
const std::list< int > &  initial_value,
const std::string &  name,
const std::list< std::string > &  prompt,
const std::string &  ok_string,
const std::string &  cancel_string 
)
protectedpure virtual

Implemented in octave_qt_link.

virtual int octave_link::do_message_dialog ( const std::string &  dlg,
const std::string &  msg,
const std::string &  title 
)
protectedpure virtual

Implemented in octave_qt_link.

template<class T >
void octave_link::do_post_event ( T *  obj,
void(T::*)(void method 
)
inlineprotected

Definition at line 371 of file octave-link.h.

References action_container::add_method().

template<class T , class A >
void octave_link::do_post_event ( T *  obj,
void(T::*)(A method,
A  arg 
)
inlineprotected

Definition at line 377 of file octave-link.h.

References action_container::add_method().

template<class T , class A >
void octave_link::do_post_event ( T *  obj,
void(T::*)(const A &)  method,
const A arg 
)
inlineprotected

Definition at line 383 of file octave-link.h.

References action_container::add_method().

virtual void octave_link::do_post_input_event ( void  )
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_pre_input_event ( void  )
protectedpure virtual

Implemented in octave_qt_link.

void octave_link::do_process_events ( void  )
protected
virtual bool octave_link::do_prompt_new_edit_file ( const std::string &  file)
protectedpure virtual

Implemented in octave_qt_link.

virtual std::string octave_link::do_question_dialog ( const std::string &  msg,
const std::string &  title,
const std::string &  btn1,
const std::string &  btn2,
const std::string &  btn3,
const std::string &  btndef 
)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_set_default_prompts ( std::string &  ps1,
std::string &  ps2,
std::string &  ps4 
)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_set_history ( const string_vector hist)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_set_workspace ( bool  top_level,
const std::list< workspace_element > &  ws 
)
protectedpure virtual

Implemented in octave_qt_link.

Referenced by set_workspace().

virtual void octave_link::do_show_doc ( const std::string &  file)
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_show_preferences ( void  )
protectedpure virtual

Implemented in octave_qt_link.

virtual void octave_link::do_update_breakpoint ( bool  insert,
const std::string &  file,
int  line 
)
protectedpure virtual

Implemented in octave_qt_link.

static bool octave_link::edit_file ( const std::string &  file)
inlinestatic

Definition at line 134 of file octave-link.h.

Referenced by F__octave_link_edit_file__().

static bool octave_link::enabled ( void  )
inlinestatic

Definition at line 313 of file octave-link.h.

Referenced by F__octave_link_enabled__(), and set_workspace().

static void octave_link::enter_debugger_event ( const std::string &  file,
int  line 
)
inlinestatic

Definition at line 271 of file octave-link.h.

Referenced by get_debug_input().

static void octave_link::entered_readline_hook ( void  )
inlinestatic

Definition at line 121 of file octave-link.h.

Referenced by octave_readline_hook().

static void octave_link::execute_command_in_terminal ( const std::string &  command)
inlinestatic

Definition at line 220 of file octave-link.h.

static void octave_link::execute_in_debugger_event ( const std::string &  file,
int  line 
)
inlinestatic

Definition at line 281 of file octave-link.h.

Referenced by execute_in_debugger_handler().

static bool octave_link::exit ( int  status)
inlinestatic

Definition at line 82 of file octave-link.h.

Referenced by clean_up_and_exit().

static void octave_link::exit_debugger_event ( void  )
inlinestatic

Definition at line 287 of file octave-link.h.

Referenced by octave_base_reader::octave_gets().

static std::list<std::string> octave_link::file_dialog ( const filter_list filter,
const std::string &  title,
const std::string &  filename,
const std::string &  dirname,
const std::string &  multimode 
)
inlinestatic

Definition at line 193 of file octave-link.h.

Referenced by F__octave_link_file_dialog__().

static void octave_link::finished_readline_hook ( void  )
inlinestatic

Definition at line 127 of file octave-link.h.

Referenced by octave_readline_hook().

static void octave_link::generate_events ( void  )
inlinestatic

Definition at line 56 of file octave-link.h.

Referenced by octave_readline_hook().

static std::list<std::string> octave_link::input_dialog ( const std::list< std::string > &  prompt,
const std::string &  title,
const std::list< float > &  nr,
const std::list< float > &  nc,
const std::list< std::string > &  defaults 
)
inlinestatic

Definition at line 179 of file octave-link.h.

Referenced by F__octave_link_input_dialog__().

static bool octave_link::instance_ok ( void  )
inlinestaticprivate

Definition at line 353 of file octave-link.h.

static std::pair<std::list<int>, int> octave_link::list_dialog ( const std::list< std::string > &  list,
const std::string &  mode,
int  width,
int  height,
const std::list< int > &  initial_value,
const std::string &  name,
const std::list< std::string > &  prompt,
const std::string &  ok_string,
const std::string &  cancel_string 
)
inlinestatic

Definition at line 162 of file octave-link.h.

Referenced by F__octave_link_list_dialog__().

static int octave_link::message_dialog ( const std::string &  dlg,
const std::string &  msg,
const std::string &  title 
)
inlinestatic

Definition at line 146 of file octave-link.h.

Referenced by F__octave_link_message_dialog__().

octave_link& octave_link::operator= ( const octave_link )
private
template<class T >
static void octave_link::post_event ( T *  obj,
void(T::*)(void method 
)
inlinestatic
template<class T , class A >
static void octave_link::post_event ( T *  obj,
void(T::*)(A method,
A  arg 
)
inlinestatic

Definition at line 100 of file octave-link.h.

template<class T , class A >
static void octave_link::post_event ( T *  obj,
void(T::*)(const A &)  method,
const A arg 
)
inlinestatic

Definition at line 107 of file octave-link.h.

template<class T , class A , class B >
static void octave_link::post_event ( T *  obj,
void(T::*)(const A &, const B &)  method,
const A arg_a,
const B arg_b 
)
inlinestatic

Definition at line 114 of file octave-link.h.

static void octave_link::post_input_event ( void  )
inlinestatic

Definition at line 265 of file octave-link.h.

Referenced by octave_base_reader::octave_gets().

static void octave_link::pre_input_event ( void  )
inlinestatic

Definition at line 259 of file octave-link.h.

Referenced by octave_base_reader::octave_gets().

static void octave_link::process_events ( bool  disable = false)
inlinestatic

Definition at line 65 of file octave-link.h.

Referenced by do_octave_atexit(), and octave_readline_hook().

static bool octave_link::prompt_new_edit_file ( const std::string &  file)
inlinestatic

Definition at line 140 of file octave-link.h.

Referenced by F__octave_link_edit_file__().

static std::string octave_link::question_dialog ( const std::string &  msg,
const std::string &  title,
const std::string &  btn1,
const std::string &  btn2,
const std::string &  btn3,
const std::string &  btndef 
)
inlinestatic

Definition at line 153 of file octave-link.h.

Referenced by F__octave_link_question_dialog__().

static void octave_link::set_default_prompts ( std::string &  ps1,
std::string &  ps2,
std::string &  ps4 
)
inlinestatic

Definition at line 306 of file octave-link.h.

Referenced by set_default_prompts().

static void octave_link::set_history ( const string_vector hist)
inlinestatic

Definition at line 241 of file octave-link.h.

Referenced by do_history(), and initialize_history().

void octave_link::set_workspace ( void  )
static
static void octave_link::set_workspace ( bool  top_level,
const std::list< workspace_element > &  ws 
)
inlinestatic

Definition at line 228 of file octave-link.h.

static bool octave_link::show_doc ( const std::string &  file)
inlinestatic

Definition at line 331 of file octave-link.h.

Referenced by F__octave_link_show_doc__().

static bool octave_link::show_preferences ( )
inlinestatic

Definition at line 319 of file octave-link.h.

Referenced by F__octave_link_show_preferences__().

static void octave_link::update_breakpoint ( bool  insert,
const std::string &  file,
int  line 
)
inlinestatic

Member Data Documentation

bool octave_link::debugging
protected

Definition at line 363 of file octave-link.h.

octave_mutex* octave_link::event_queue_mutex
protected

Definition at line 358 of file octave-link.h.

Referenced by do_discard_events(), and do_process_events().

event_queue octave_link::gui_event_queue
protected

Definition at line 361 of file octave-link.h.

Referenced by do_discard_events(), and do_process_events().

octave_link * octave_link::instance = 0
staticprivate

Definition at line 345 of file octave-link.h.

Referenced by connect_link(), and set_workspace().

bool octave_link::link_enabled
protected

Definition at line 364 of file octave-link.h.


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