#include "bbstdVectorToString.h" #include "bbstdPackage.h" namespace bbstd { //==================================================================== BBTK_BLACK_BOX_TEMPLATE_IMPLEMENTATION(VectorToString, bbtk::AtomicBlackBox); //==================================================================== /* //==================================================================== // Template specialization of encode_item template <> int8_t VectorToString ::encode_item(const std::string& s) { return (int8_t)atoi ( s.c_str() ); } template <> uint8_t VectorToString ::encode_item(const std::string& s) { return (uint8_t)atoi ( s.c_str() ); } template <> int16_t VectorToString ::encode_item(const std::string& s) { return (int16_t)atoi ( s.c_str() ); } template <> uint16_t VectorToString ::encode_item(const std::string& s) { return (uint16_t)atoi ( s.c_str() ); } template <> int32_t VectorToString ::encode_item(const std::string& s) { return (int32_t)atoi ( s.c_str() ); } template <> uint32_t VectorToString ::encode_item(const std::string& s) { return (uint32_t)atoi ( s.c_str() ); } template <> long VectorToString ::encode_item(const std::string& s) { return (long)atoi ( s.c_str() ); } template <> float VectorToString ::encode_item(const std::string& s) { return (float)atof ( s.c_str() ); } template <> double VectorToString ::encode_item(const std::string& s) { return atof ( s.c_str() ); } template <> std::string VectorToString ::encode_item(const std::string& s) { return s; } */ //==================================================================== //==================================================================== // Add the specialized adaptors to the package BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,int8_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,uint8_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,int16_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,uint16_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,int32_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,uint32_t); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,long); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,float); BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,double); typedef std::string string; BBTK_ADD_TEMPLATE_BLACK_BOX_TO_PACKAGE(std,VectorToString,string); //==================================================================== } // namespace bbstd