Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/03/03 08:06:36 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/03/07 08:40:14 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace bbtk
{
-
+#ifdef _USE_WXWIDGETS_
+ class WxConsole;
+#endif
+
class BBTK_EXPORT Interpreter
{
/// Destructor
~Interpreter();
- static Interpreter* mGlobalInterpreter;
-
/// Launches a command line interpreter (with a prompt)
void CommandLineInterpreter();
/// Sets the bool that indicates wether we are in command line context
void SetCommandLine(bool v = true) { mCommandLine = v; }
+#ifdef _USE_WXWIDGETS_
+ /// Sets the WxConsole that created the interpreter (if any)
+ void SetWxConsole(WxConsole* c) { mWxConsole = c; }
+ /// Gets the WxConsole that created the interpreter (if any)
+ WxConsole* GetWxConsole() { return mWxConsole; }
+ /// Gets the WxConsole that created the interpreter (if any) - const
+ const WxConsole* GetWxConsole() const { return mWxConsole; }
+#endif
+
+ /// Gets the Executer
+ VirtualExec* GetExecuter() { return mExecuter; }
+ /// Gets the Executer (const)
+ const VirtualExec* GetExecuter() const { return mExecuter; }
private:
//==================================================================
// ATTRIBUTES
- /// The factory
- // bbtk::Factory* mFactory;
-
- /// The command executer
+ /// The command executer used
bbtk::VirtualExec* mExecuter;
+#ifdef _USE_WXWIDGETS_
+ /// The WxConsole which uses the interpreter (0 if none)
+ bbtk::WxConsole* mWxConsole;
+#endif
+
/// Vector of open files
std::vector<std::ifstream*> mFile;
std::deque< char* > mHistory;
};
+ // EO class Interpreter
+
+
+
// The "Quit" exception