16 #ifndef QC_STRING_UTILS_H 17 #define QC_STRING_UTILS_H 28 std::vector<std::string> getBinRepresentation(
unsigned char* data,
size_t size)
31 std::vector<std::string> result;
34 for (
size_t i = 0; i < size; i++) {
35 std::bitset<16> x(data[i]);
37 result.push_back(ss.str());
38 ss.str(std::string());
43 std::vector<std::string> getHexRepresentation(
unsigned char* data,
size_t size)
46 std::vector<std::string> result;
48 ss << std::hex << std::setfill(
'0');
50 for (
size_t i = 0; i < size; i++) {
51 ss << std::setw(2) << static_cast<unsigned>(data[i]) <<
" ";
52 result.push_back(ss.str());
53 ss.str(std::string());
59 #endif // QC_STRING_UTILS_H These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19