]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdMagicBox.h
=== MAJOR RELEASE ====
[bbtk.git] / packages / std / src / bbstdMagicBox.h
index 951f92eaa6214d189c5e44d9f1ac955e4ced863f..55f0d7ca8c893931001eaabbe22cd528bf80178c 100644 (file)
@@ -10,9 +10,9 @@ namespace bbstd
     : 
     public bbtk::AtomicBlackBox
   {
-    BBTK_USER_BLACK_BOX_INTERFACE(MagicBox,bbtk::AtomicBlackBox);
-       BBTK_DECLARE_INPUT(In,bbtk::Data);
-       BBTK_DECLARE_OUTPUT(Out,bbtk::Data);
+    BBTK_BLACK_BOX_INTERFACE(MagicBox,bbtk::AtomicBlackBox);
+    BBTK_DECLARE_INPUT(In,bbtk::Data);
+    BBTK_DECLARE_OUTPUT(Out,bbtk::Data);
     BBTK_PROCESS(DoProcess);
     void DoProcess() { bbSetOutputOut( bbGetInputIn() ); }
     
@@ -66,19 +66,19 @@ namespace bbstd
   BBTK_BEGIN_DESCRIBE_BLACK_BOX(MagicBox,bbtk::AtomicBlackBox);
   BBTK_NAME("MagicBox");
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
-  BBTK_CATEGORY("adaptor");
+  BBTK_CATEGORY("misc");
   BBTK_DESCRIPTION("Takes *any kind* of data and copies it to its output. Is a magic box as any box output can be plugged into it and its output can be plugged into any other box input (dynamic type checking, see below), hence it can be put between **any** two boxes. Type matching between its output and the input of the box(es) to which it is connected is made at *run-time*. The pipeline will be executed if the data types : i) match exactly ii) can be transformed by an adaptor iii) are related pointers, i.e. if the output pointer can be upcasted (static_cast) or downcasted (dynamic_cast) to an input type pointer (see the bbtk::any output connection rule in the guide for details). Important uses of the MagicBox are : 1) performing run-time pointer cast, either upward or backward an object hierarchy 2) perform data adaptation (adaptor creation) at run-time vs. pipeline creation time.");
   AddInputDescriptor
   (new bbtk::AtomicBlackBoxInputDescriptor
    (typeid(MagicBoxDescriptor),
-    "In","Input data",
+    "In","Input data","",
     new bbtk::AtomicBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
     (&MagicBox::bbGetInputIn),
     new MagicBoxSetFunctor (&MagicBox::bbSetInputIn) ) );
   AddOutputDescriptor
   (new bbtk::AtomicBlackBoxOutputDescriptor
    (typeid(MagicBoxDescriptor),
-    "Out","Output data",
+    "Out","Output data","",
     new bbtk::AtomicBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
     (&MagicBox::bbGetOutputOut),
     new MagicBoxSetFunctor (&MagicBox::bbSetOutputOut) ) );