Mercurial > octave-libgccjit
changeset 17919:b6d07dd90f3d
rename octave_main_thread to octave_interpreter
* octave-interpreter.h, octave-interpreter.cc: Rename from
octave-main-thread.h and octave-main-thread.cc. Change name of class
from octave_main_thread to octave_interpreter. Change all uses.
(octave_interperter::execute): Rename from execute_interpreter.
* libgu/src/module.mk: Update file lists.
* octave-qt-link.h, octave-qt-link.cc
(octave_qt_link::octave_main_thread): Rename to command_interpreter.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 12 Nov 2013 12:36:30 -0500 |
parents | a38cee8f0a9b |
children | 5c3f22dd0bbb |
files | libgui/src/module.mk libgui/src/octave-interpreter.cc libgui/src/octave-interpreter.h libgui/src/octave-main-thread.cc libgui/src/octave-main-thread.h libgui/src/octave-qt-link.cc libgui/src/octave-qt-link.h |
diffstat | 7 files changed, 95 insertions(+), 106 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/module.mk Tue Nov 12 12:36:30 2013 -0500 +++ b/libgui/src/module.mk Tue Nov 12 12:36:30 2013 -0500 @@ -90,7 +90,7 @@ src/moc-files-dock-widget.cc \ src/moc-history-dock-widget.cc \ src/moc-main-window.cc \ - src/moc-octave-main-thread.cc \ + src/moc-octave-interpreter.cc \ src/moc-octave-qt-link.cc \ src/moc-settings-dialog.cc \ src/moc-news-dock-widget.cc \ @@ -127,7 +127,7 @@ src/m-editor/octave-qscintilla.h \ src/main-window.h \ src/octave-gui.h \ - src/octave-main-thread.h \ + src/octave-interpreter.h \ src/octave-qt-link.h \ src/qtinfo/parser.h \ src/qtinfo/webinfo.h \ @@ -154,7 +154,7 @@ src/main-window.cc \ src/octave-dock-widget.cc \ src/octave-gui.cc \ - src/octave-main-thread.cc \ + src/octave-interpreter.cc \ src/octave-qt-link.cc \ src/qtinfo/parser.cc \ src/qtinfo/webinfo.cc \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libgui/src/octave-interpreter.cc Tue Nov 12 12:36:30 2013 -0500 @@ -0,0 +1,41 @@ +/* + +Copyright (C) 2013 John W. Eaton +Copyright (C) 2011-2013 Jacob Dawid + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +<http://www.gnu.org/licenses/>. + +*/ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <string> + +#include "octave.h" + +#include "octave-interpreter.h" + +void +octave_interpreter::execute (void) +{ + octave_initialize_interpreter (octave_cmdline_argc, octave_cmdline_argv, + octave_embedded); + + octave_execute_interpreter (); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libgui/src/octave-interpreter.h Tue Nov 12 12:36:30 2013 -0500 @@ -0,0 +1,46 @@ +/* + +Copyright (C) 2013 John W. Eaton +Copyright (C) 2011-2013 Jacob Dawid + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +<http://www.gnu.org/licenses/>. + +*/ + +#ifndef octave_interpreter_h +#define octave_interpreter_h 1 + +#include <QObject> + +class octave_interpreter : public QObject +{ + Q_OBJECT + +public: + + // An object to manage the Octave interpreter. + + octave_interpreter (void) : QObject () { } + +public slots: + + // Initialize and execute the octave interpreter. + + void execute (void); +}; + +#endif
--- a/libgui/src/octave-main-thread.cc Tue Nov 12 12:36:30 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - -Copyright (C) 2013 John W. Eaton -Copyright (C) 2011-2013 Jacob Dawid - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <string> - -#include "builtin-defun-decls.h" -#include "octave.h" -#include "ov-builtin.h" -#include "ov-fcn-handle.h" - -#include "octave-main-thread.h" -#include "octave-link.h" - -void -octave_main_thread::execute_interpreter (void) -{ - octave_initialize_interpreter (octave_cmdline_argc, octave_cmdline_argv, - octave_embedded); - - octave_execute_interpreter (); -}
--- a/libgui/src/octave-main-thread.h Tue Nov 12 12:36:30 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - -Copyright (C) 2013 John W. Eaton -Copyright (C) 2011-2013 Jacob Dawid - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#ifndef OCTAVEMAINTHREAD_H -#define OCTAVEMAINTHREAD_H - -#include <QObject> - -/** - * \class octave_main - * \brief This class represents a thread just running octave_main. - * \author Jacob Dawid - */ -class octave_main_thread : public QObject -{ - Q_OBJECT - -public: - - // Create a new thread for running the octave interpreter. - - octave_main_thread (void) : QObject () { } - -public slots: - - // Start the thread and initialize and execute the octave - // interpreter. - - void execute_interpreter (void); -}; - -#endif // OCTAVEMAINTHREAD_H
--- a/libgui/src/octave-qt-link.cc Tue Nov 12 12:36:30 2013 -0500 +++ b/libgui/src/octave-qt-link.cc Tue Nov 12 12:36:30 2013 -0500 @@ -45,12 +45,12 @@ octave_qt_link::octave_qt_link (void) : octave_link (), main_thread (new QThread ()), - octave_interpreter (new octave_main_thread ()) + command_interpreter (new octave_interpreter ()) { connect (this, SIGNAL (execute_interpreter_signal (void)), - octave_interpreter, SLOT (execute_interpreter (void))); + command_interpreter, SLOT (execute (void))); - octave_interpreter->moveToThread (main_thread); + command_interpreter->moveToThread (main_thread); main_thread->start (); }
--- a/libgui/src/octave-qt-link.h Tue Nov 12 12:36:30 2013 -0500 +++ b/libgui/src/octave-qt-link.h Tue Nov 12 12:36:30 2013 -0500 @@ -34,7 +34,7 @@ #include <QThread> #include "octave-link.h" -#include "octave-main-thread.h" +#include "octave-interpreter.h" // Defined for purposes of sending QList<int> as part of signal. typedef QList<int> QIntList; @@ -144,8 +144,7 @@ // Thread running octave_main. QThread *main_thread; - // Octave interpreter (misnamed class) - octave_main_thread *octave_interpreter; + octave_interpreter *command_interpreter; signals: