]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreterPython.cxx
#3498 Export to Python code for 3DSlicer
[bbtk.git] / kernel / src / bbtkInterpreterPython.cxx
index 68cce9441c264f434304a0ab7a4b459a2ebbfadb..f13ded800b348677874e61d6ac126b9abf2ca91b 100644 (file)
@@ -37,7 +37,6 @@ Version:   $Revision$
  *  \brief Class bbtk::BBPInterpreter
  */
 
-
 #include "bbtkInterpreterPython.h"
 
 #include "bbtkExecuter.h"
@@ -55,8 +54,6 @@ namespace bbtk
     }
   //=========================================================================
 
-
-
   //=========================================================================
     InterpreterPython::InterpreterPython()
     {
@@ -70,7 +67,6 @@ namespace bbtk
     }
   //=========================================================================
 
-
   //=========================================================================
   /// Creates a new black box in current complex box
   void InterpreterPython::commandNew( const std::string& boxType, const std::string& boxName) // virtual
@@ -84,7 +80,6 @@ namespace bbtk
   }
   //=========================================================================
 
-
   //=========================================================================
   /// Connects the output boxOutput to the input boxInput
   void InterpreterPython::commandConnection (const std::string &boxfrom,
@@ -107,10 +102,11 @@ namespace bbtk
   //=========================================================================
   void InterpreterPython::commandOutput(const std::string &name,const std::string &box,const std::string &output,const std::string  &help)
   {
+      std::string  code("DECLARE_OUTPUT('"+name+"','"+box+"."+output+"')");
+      this->pythonBBTK.push_back(code);
   }
   //=========================================================================
 
-
   //=========================================================================
   /// sets the input of the box with the value
   void InterpreterPython::commandSet(const std::string &box,const std::string &input,const std::string &value) // virtual
@@ -121,7 +117,6 @@ namespace bbtk
   }
   //=========================================================================
 
-
   //=========================================================================
   void InterpreterPython::commandDefine(const std::string &name,const std::string &pack,const std::string &scriptfilename) // virtual
   {