#include "bbstdToString.h" #include "bbstdPackage.h" #include namespace bbstd { //==================================================================== BBTK_USER_BLACK_BOX_TEMPLATE_IMPLEMENTATION(ToString, bbtk::AtomicBlackBox); //==================================================================== //==================================================================== template void ToString ::DoIt() { std::ostringstream s; s << bbGetInputIn(); bbSetOutputOut( s.str() ); } //==================================================================== //==================================================================== // Add the specialized adaptors to the package BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,bool); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,int8_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,uint8_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,int16_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,uint16_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,int32_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,uint32_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,float); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,ToString,double); //==================================================================== } // namespace bbstd