]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdRelay.h
Add StringVectorToNumericalVector box to package std
[bbtk.git] / packages / std / src / bbstdRelay.h
index a2a3ce9a6503298ad8c2d417c52b9ac576f93161..4d9d7ff0e4ebdf6b0561b9e2d726123021dff496 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbstdRelay.h,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 08:55:21 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2009/05/14 14:43:38 $
+  Version:   $Revision: 1.10 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -63,7 +63,34 @@ namespace bbstd
   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(Relay);
   //=======================================================================
 
+  template <class T> void Relay<T>::bbUserSetDefaultValues() {}
+  template <class T> void Relay<T>::bbUserInitializeProcessing() {}
+  template <class T> void Relay<T>::bbUserFinalizeProcessing() {}
+
 }
 // namespace bbstd
 
+//=======================================================================
+// MACRO
+
+#define BBTK_DEFINE_RELAY_BLACK_BOX(TYPE,PACKAGE,NAME) \
+class bb ## PACKAGE ## _EXPORT NAME : public bbtk::AtomicBlackBox { \
+  BBTK_BLACK_BOX_INTERFACE(NAME,bbtk::AtomicBlackBox); \
+  BBTK_DECLARE_INPUT(In,TYPE); \
+  BBTK_DECLARE_OUTPUT(Out,TYPE); \
+  BBTK_PROCESS(Process); \
+ protected: \
+  void Process() { bbSetOutputOut ( bbGetInputIn() ); } \
+}; \
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(NAME,bbtk::AtomicBlackBox);\
+BBTK_NAME(#NAME); \
+BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr"); \
+BBTK_CATEGORY("misc"); \
+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_INPUT(NAME,In,"Input",TYPE,"");\
+BBTK_OUTPUT(NAME,Out,"Output",TYPE,"");\
+BBTK_END_DESCRIBE_BLACK_BOX(NAME);
+
+//=======================================================================
+
 #endif // __bbstdRelay_h_INCLUDED_H__