5#include <SimoxUtility/algorithm/string.h>
7#include <RobotAPI/libraries/armem/aron/MemoryID.aron.generated.h>
11 armarx::armem::arondto::MemoryID::ToAronType()->getFullName();
17 remove_wrap(
const std::string&
string,
const std::string& prefix,
const std::string& suffix)
19 if (simox::alg::starts_with(
string, prefix) && simox::alg::ends_with(
string, suffix))
21 return string.substr(prefix.size(),
string.size() - prefix.size() - suffix.size());
39 std::string n = typeName;
40 n = s::replace_all(n,
"armarx::aron::type::",
"");
41 n = s::replace_all(n,
"armarx::aron::data::",
"");
43 if (s::starts_with(n,
"Object<"))
45 n = remove_wrap(n,
"Object<",
">");
46 const std::string del =
"::";
47 size_t find = n.rfind(del);
52 ss << n.substr(find) <<
" (" << n.substr(0, find - del.size()) <<
")";
58 if (s::contains(n,
"<"))
60 std::string container = n.substr(0, n.find(
"<"));
61 std::string subtype = remove_wrap(n, (container +
"<"),
">");
63 n = n.substr(0, n.find(
"<") + 1) + subtype +
">";
std::string sanitizeTypeName(const std::string &typeName)
const std::string rawMemoryIDTypeName
const std::string sanitizedMemoryIDTypeName