GNU Octave  4.0.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 Referenceabstract

#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 bool confirm_shutdown (void)
 
static void connect_link (octave_link *)
 
static bool copy_image_to_clipboard (const std::string &file)
 
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)
 
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 bool do_confirm_shutdown (void)=0
 
virtual bool do_copy_image_to_clipboard (const std::string &file)=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, bool debug, 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 198 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 221 of file octave-link.h.

Referenced by octave_change_to_directory().

static void octave_link::clear_history ( void  )
inlinestatic

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

Referenced by do_history().

static void octave_link::clear_workspace ( void  )
inlinestatic

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

Referenced by Fclear().

static bool octave_link::confirm_shutdown ( void  )
inlinestatic

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

Referenced by Fquit().

void octave_link::connect_link ( octave_link obj)
static

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

References error(), and instance.

Referenced by main_window::construct_octave_qt_link().

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

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

Referenced by QtHandles::Figure::copy_figure_callback().

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

Definition at line 212 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 bool octave_link::do_confirm_shutdown ( void  )
protectedpure virtual

Implemented in octave_qt_link.

virtual bool octave_link::do_copy_image_to_clipboard ( const std::string &  file)
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 396 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 397 of file octave-link.h.

void octave_link::do_generate_events ( void  )
protected

Definition at line 82 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 379 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 385 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 391 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,
bool  debug,
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 142 of file octave-link.h.

Referenced by F__octave_link_edit_file__().

static bool octave_link::enabled ( void  )
inlinestatic

Definition at line 321 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 279 of file octave-link.h.

Referenced by get_debug_input().

static void octave_link::entered_readline_hook ( void  )
inlinestatic

Definition at line 123 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 228 of file octave-link.h.

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

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

Referenced by execute_in_debugger_handler().

static bool octave_link::exit ( int  status)
inlinestatic

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

Referenced by clean_up_and_exit().

static void octave_link::exit_debugger_event ( void  )
inlinestatic

Definition at line 295 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 201 of file octave-link.h.

Referenced by F__octave_link_file_dialog__().

static void octave_link::finished_readline_hook ( void  )
inlinestatic

Definition at line 129 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 187 of file octave-link.h.

Referenced by F__octave_link_input_dialog__().

static bool octave_link::instance_ok ( void  )
inlinestaticprivate

Definition at line 361 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 170 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 154 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 110 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 117 of file octave-link.h.

static void octave_link::post_input_event ( void  )
inlinestatic

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

Referenced by octave_base_reader::octave_gets().

static void octave_link::pre_input_event ( void  )
inlinestatic

Definition at line 267 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 148 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 161 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 314 of file octave-link.h.

Referenced by set_default_prompts().

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

Definition at line 249 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 236 of file octave-link.h.

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

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

Referenced by F__octave_link_show_doc__().

static bool octave_link::show_preferences ( )
inlinestatic

Definition at line 327 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 371 of file octave-link.h.

Referenced by set_workspace().

octave_mutex* octave_link::event_queue_mutex
protected

Definition at line 366 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 369 of file octave-link.h.

Referenced by do_discard_events(), and do_process_events().

octave_link * octave_link::instance = 0
staticprivate

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

Referenced by connect_link(), and set_workspace().

bool octave_link::link_enabled
protected

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


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