]> Creatis software - bbtk.git/blob - packages/std/src/bbstdToString.h
*** empty log message ***
[bbtk.git] / packages / std / src / bbstdToString.h
1 #ifndef __bbstdToString_h_INCLUDED__
2 #define __bbstdToString_h_INCLUDED__
3
4 #include "bbtkUserBlackBox.h"
5
6 namespace bbstd 
7 {
8   
9   //=================================================================
10   // UserBlackBox declaration
11   template <class T>
12   class ToString : public bbtk::UserBlackBox
13   {  
14     BBTK_USER_BLACK_BOX_INTERFACE(ToString,bbtk::UserBlackBox);
15     BBTK_DECLARE_INPUT(In,T);
16     BBTK_DECLARE_OUTPUT(Out,std::string);
17     BBTK_PROCESS(DoIt);
18     void DoIt(); 
19   };
20   //=================================================================
21   
22   
23   
24   
25   //=================================================================
26   // UserBlackBox description
27   BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(ToString);
28   BBTK_NAME(bbtk::TypeName<T>()+"ToString");
29   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
30   BBTK_DEFAULT_ADAPTOR();
31   BBTK_DESCRIPTION("Converts a "+bbtk::TypeName<T>()+" into a string");
32   BBTK_TEMPLATE_INPUT(ToString, In,"Input",T);
33   BBTK_TEMPLATE_OUTPUT(ToString, Out,"Output",std::string);
34   BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(ToString);
35   //=================================================================
36   
37 } // namespace bbstd 
38
39 #endif // __bbstdToString_h_INCLUDED__
40