diff qt-interpreter.cpp @ 6:1b575145197e

interpreter is now a class instead of a namespace with functions
author John W. Eaton <jwe@octave.org>
date Thu, 23 May 2019 07:41:18 -0400
parents 54edd85237ab
children 04867eba6428
line wrap: on
line diff
--- a/qt-interpreter.cpp	Wed May 22 18:07:37 2019 -0400
+++ b/qt-interpreter.cpp	Thu May 23 07:41:18 2019 -0400
@@ -12,14 +12,8 @@
 namespace calc
 {
   qt_interpreter::qt_interpreter (void)
-  {
-    interpreter::init ();
-  }
-
-  qt_interpreter::~qt_interpreter (void)
-  {
-    interpreter::fini ();
-  }
+    : m_interpreter ()
+  { }
 
   void qt_interpreter::execute (void)
   {
@@ -27,6 +21,6 @@
 
   void qt_interpreter::accept_input_line (const QString& line)
   {
-    interpreter::parse_and_execute (line.toStdString ());
+    m_interpreter.parse_and_execute (line.toStdString ());
   }
 }