]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkVirtualExec.h
Global factory in course of removal... does not compile but have to commit to continu...
[bbtk.git] / kernel / src / bbtkVirtualExec.h
index 96a264b55a8f3fbd0231ae163dcb5be5254f885b..1bb48a94fab0729263345db374c2202d34eee9a8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkVirtualExec.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/06 09:27:52 $
-  Version:   $Revision: 1.7 $
+  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;
 
@@ -156,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;
     
@@ -204,6 +223,7 @@ namespace bbtk
 
     /// Dialog mode
     DialogModeType mDialogMode;
+    */
   };
 }
 #endif