X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdRelay.h;h=c0ef92d0ab181cb5922c4e10aa8dad484737297a;hb=d8041d1ef54a73acc2306557435f6b04edf60daf;hp=b44cb25a0846c8ab1a2ee8c4a15a028c23f6d5e0;hpb=001c522c9cd723fd522afda8a3882607c2565b85;p=bbtk.git diff --git a/packages/std/src/bbstdRelay.h b/packages/std/src/bbstdRelay.h index b44cb25..c0ef92d 100644 --- a/packages/std/src/bbstdRelay.h +++ b/packages/std/src/bbstdRelay.h @@ -1,31 +1,36 @@ #ifndef __bbstdRelay_h_INCLUDED_H__ #define __bbstdRelay_h_INCLUDED_H__ -#include "bbtkUserBlackBox.h" +#include "bbtkAtomicBlackBox.h" namespace bbstd { + //======================================================================= template class Relay : - public bbtk::UserBlackBox + public bbtk::AtomicBlackBox { - BBTK_USER_BLACK_BOX_INTERFACE(Relay,bbtk::UserBlackBox); - BBTK_DECLARE_INPUT(In,T); - BBTK_DECLARE_OUTPUT(Out,T); + BBTK_TEMPLATE_BLACK_BOX_INTERFACE(Relay,bbtk::AtomicBlackBox,T); + BBTK_DECLARE_INPUT(In,T); + BBTK_DECLARE_OUTPUT(Out,T); BBTK_PROCESS(Process); protected: void Process() { bbSetOutputOut ( bbGetInputIn() ); } }; + //======================================================================= - BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(Relay); + //======================================================================= + BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(Relay,bbtk::AtomicBlackBox); BBTK_NAME(bbtk::HumanTypeName()+"Relay"); - BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); + BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr"); BBTK_CATEGORY("misc"); - BBTK_DESCRIPTION("Relays a "+bbtk::TypeName()); - BBTK_TEMPLATE_INPUT(Relay,In,"Input",T); - BBTK_TEMPLATE_OUTPUT(Relay,Out,"Output",T); + BBTK_DESCRIPTION("Just copies the value of its input to its output. Usefull to plug an input of a complex box into different internal boxes."); + BBTK_TEMPLATE_INPUT(Relay,In,"Input",T); + BBTK_TEMPLATE_OUTPUT(Relay,Out,"Output",T); BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(Relay); + //======================================================================= + } // namespace bbstd