]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdExecBbiCommand.cxx
re activate ExecBbiCommand
[bbtk.git] / packages / std / src / bbstdExecBbiCommand.cxx
index fb85734a9b71a4be1151ac0fe492ad28aeacb1f5..ba7957c9b04dbb3d6a722a417ea3f591adc66df9 100755 (executable)
@@ -7,7 +7,7 @@ namespace bbstd
 {
 
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,ExecBbiCommand);
-  BBTK_USER_BLACK_BOX_IMPLEMENTATION(ExecBbiCommand,bbtk::AtomicBlackBox);
+  BBTK_BLACK_BOX_IMPLEMENTATION(ExecBbiCommand,bbtk::AtomicBlackBox);
 
   void ExecBbiCommand::bbUserConstructor() 
   { 
@@ -17,13 +17,15 @@ namespace bbstd
 
   void ExecBbiCommand::DoProcess()
     {
+     
       // Look for the interpreter
-      bbtk::Interpreter* I = 0;
+      bbtk::Interpreter::Pointer I;
          bool delete_inter = false; 
          if (bbGetParent() != 0) 
        {
-         bbtk::Factory* f = ((bbtk::ComplexBlackBoxDescriptor*)bbGetParent()
-                       ->bbGetDescriptor())->GetFactory();
+         bbtk::Factory::Pointer f 
+               = ((bbtk::ComplexBlackBoxDescriptor*)bbGetParent()
+                 ->bbGetDescriptor().get())->GetFactory();
          if ((f != 0)&&
              (f->GetExecuter()))
            {
@@ -33,7 +35,7 @@ namespace bbstd
       if (I==0) 
        {
          //      bbtkError("ExecBbiCommand::DoProcess() : could not find interpreter");
-         I = new bbtk::Interpreter();
+         I = bbtk::Interpreter::New();
          delete_inter = true; 
        }
 
@@ -66,7 +68,7 @@ namespace bbstd
          
        }
       
-      if (delete_inter) delete I;
+//      if (delete_inter) delete I;
       
       /*  Grrr  not works in windows
        char * pch;