Mercurial > hg > octave-nkf
diff src/main-cli.cc @ 19978:034bcac0b61c
use of C++ API for running a file (bug #42307)
* octave-cmd.cc: New file providing the new command class octave_cmd;
(prepare_command_editor): common action that all derived command classes
use for method execute;
(octave_cmd_exec::execute): execute method of derived class for executing
ordinary commands in the terminal;
(octave_cmd_eval::execute): execute method of derived class for running a
file (as function if it is a valid identifier or as script)
* octave-cmd.h: providing base and derived classes
* main-window.cc (main_window): _cmd_queue is not a pointer anymore;
(~main_window): _cmd_queue is not a pointer anymore;
(execute_command_in_terminal): use new command class for queuing a command;
(run_file_in_terminal): check for valid identifier moved from here to
the execute method of the related command class;
(run_file_callback): use new class for queuing command, path check moved
from here into the execute method of the command class;
(queue_command): gets new command class instead of a string as input;
(closeEvent): queue command class instead of string;
(execute_command_callback): command queue contains command class instances;
* main-window.h: use new octave-cmd class for queue_command,
the command queue is not a pointer anymore
* module.mk: new files octave-cmd.cc and octave-cmd.h
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 19 Feb 2015 22:05:12 +0100 |
parents | 4197fc428c7d |
children |