]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkExecuter.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkExecuter.cxx
index 9be94bf19a29e4252a311401935b665dbb99ed5a..3c7b04cf704b7f803921ee9dcfc8be9e693718b0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 08:27:19 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.16 $
 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -232,6 +232,38 @@ namespace bbtk
   }
   //======================================================================= 
 
+  //=======================================================================  
+  void Executer::Kind(const std::string& kind)
+  {
+    if (kind=="ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::ADAPTOR);
+      }
+    else if (kind=="DEFAULT_ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_ADAPTOR);
+      }
+    if (kind=="WIDGET_ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::WIDGET_ADAPTOR);
+      }
+    else if (kind=="DEFAULT_WIDGET_ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR);
+      }
+    else
+      {
+       bbtkError("Unknown box kind : '"<<kind<<"'. "
+                 <<"Valid kinds are 'ADAPTOR','DEFAULT_ADAPTOR',"
+                 <<"'WIDGET_ADAPTOR','DEFAULT_WIDGET_ADAPTOR'");
+      }
+  }
+  //=======================================================================
+
   //=======================================================================
   void Executer::Create ( const std::string& nodeType, 
                           const std::string& nodeName)