]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdStringTo.h
*** empty log message ***
[bbtk.git] / packages / std / src / bbstdStringTo.h
diff --git a/packages/std/src/bbstdStringTo.h b/packages/std/src/bbstdStringTo.h
new file mode 100644 (file)
index 0000000..13ec026
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef __bbstdStringTo_h_INCLUDED__
+#define __bbstdStringTo_h_INCLUDED__
+
+#include "bbtkUserBlackBox.h"
+
+
+namespace bbstd 
+{
+
+  //=================================================================
+  // UserBlackBox declaration
+  template <class T>
+  class StringTo : public bbtk::UserBlackBox
+  {  
+    BBTK_USER_BLACK_BOX_INTERFACE(StringTo,bbtk::UserBlackBox);
+    BBTK_DECLARE_INPUT(In,std::string);
+    BBTK_DECLARE_OUTPUT(Out,T);
+    BBTK_PROCESS(DoIt);
+    void DoIt(); 
+  };
+  //=================================================================
+  
+  
+  
+  
+  //=================================================================
+  // UserBlackBox description
+  BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(StringTo);
+  BBTK_NAME("StringTo"+bbtk::HumanTypeName<T>());
+  BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
+  BBTK_DEFAULT_ADAPTOR();
+  BBTK_DESCRIPTION("Converts the content of the input string to a "+bbtk::TypeName<T>());
+  BBTK_TEMPLATE_INPUT(StringTo, In,"Input",std::string);
+  BBTK_TEMPLATE_OUTPUT(StringTo, Out,"Output",T);
+  BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(StringTo);
+  //=================================================================
+  
+} // namespace bbstd
+
+#endif // __bbstdStringTo_h_INCLUDED__
+
+
+
+