]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkVirtualExec.h
Created a bbs editor : bbed
[bbtk.git] / kernel / src / bbtkVirtualExec.h
index f7c2295446c7fae4f3a556d762f72e6fea3f23fc..1bb48a94fab0729263345db374c2202d34eee9a8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkVirtualExec.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/05 12:16:56 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/03/07 08:40:14 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #define __bbtkVirtualExec_h__
 
 #include "bbtkSystem.h"
-#include "bbtkComplexBlackBox.h"
+//#include "bbtkComplexBlackBox.h"
 #include "bbtkFactory.h"
-#include <string>
-#include <deque>
+//#include <string>
+//#include <deque>
 
 namespace bbtk
 {
 
+  class Interpreter;
+
   class /*BBTK_EXPORT*/ VirtualExec   // All methods are pure virtual
   {
 
@@ -48,6 +50,20 @@ namespace bbtk
     }
     DialogModeType;
 
+    VirtualExec() : mInterpreter(0) {}
+
+    /// Sets the interpreter who uses it 
+    void SetInterpreter(Interpreter* i) { mInterpreter = i; }
+    /// Gets the interpreter who uses it 
+    Interpreter* GetInterpreter() { return mInterpreter; }
+    /// Gets the interpreter who uses it (const)
+    const Interpreter* GetInterpreter() const { return mInterpreter; }
+
+    /// Gets the factory used by the executer
+    virtual Factory* GetFactory() { return 0; }
+    /// Gets the factory used by the executer (const)
+    virtual const Factory* GetFactory() const { return 0; }
+    
     /// Sets the inputs of the workspace : 
     virtual void SetInputs(const std::map<std::string,std::string>& m) = 0;
 
@@ -71,6 +87,10 @@ namespace bbtk
     virtual void Define (const std::string &name,
                 const std::string& pack,
                 const std::string &scriptfilename) = 0;
+    /// Sets the file name to use for the current definition
+    /// (Used to set it after the Define command)
+    virtual void SetCurrentFileName (const std::string &name ) = 0;
 
     /// End the definition of a ComplexBlackBox
     virtual void EndDefine () = 0;
@@ -152,6 +172,9 @@ namespace bbtk
 
   private:
 
+   /// The interpreter which uses it (0 if none)
+    Interpreter* mInterpreter;
+    /*
     /// Gets the current working black box 
     virtual ComplexBlackBoxDescriptor* Current() = 0;
     
@@ -200,6 +223,7 @@ namespace bbtk
 
     /// Dialog mode
     DialogModeType mDialogMode;
+    */
   };
 }
 #endif