15#include "auto_apms_behavior_tree_core/convert.hpp"
17#include "auto_apms_util/string.hpp"
24std::vector<uint8_t> convertFromString<std::vector<uint8_t>>(StringView str)
26 auto parts = BT::splitString(str,
';');
27 std::vector<uint8_t> output;
28 output.reserve(parts.size());
29 for (
const StringView & part : parts) {
30 output.push_back(convertFromString<uint8_t>(part));
36std::vector<bool> convertFromString<std::vector<bool>>(StringView str)
38 auto parts = BT::splitString(str,
';');
39 std::vector<bool> output;
40 output.reserve(parts.size());
41 for (
const StringView & part : parts) {
42 output.push_back(convertFromString<bool>(part));
48std::vector<int64_t> convertFromString<std::vector<int64_t>>(StringView str)
50 auto parts = BT::splitString(str,
';');
51 std::vector<int64_t, std::allocator<int64_t>> output;
52 output.reserve(parts.size());
53 for (
const StringView & part : parts) {
54 output.push_back(convertFromString<int64_t>(part));
60std::string
toStr(
const std::vector<uint8_t> & value)
62 return auto_apms_util::join(value,
";");
66std::string toStr<std::vector<bool>>(
const std::vector<bool> & value)
68 return auto_apms_util::join(value,
";");
72std::string toStr<std::vector<int64_t>>(
const std::vector<int64_t> & value)
74 return auto_apms_util::join(value,
";");
78std::string toStr<std::vector<double>>(
const std::vector<double> & value)
80 return auto_apms_util::join(value,
";");
84std::string toStr<std::vector<std::string>>(
const std::vector<std::string> & value)
86 return auto_apms_util::join(value,
";");
const char * toStr(const ActionNodeErrorCode &err)
Convert the action error code to string.