27 #include <SimoxUtility/algorithm/vector.hpp>
28 #include <SimoxUtility/meta/type_name.h>
34 "std::tuple<" +
simox::alg::join(ExtractCppTypenames(e.getAcceptedTypes()),
", ") +
">",
35 "std::tuple<" +
simox::alg::join(ExtractCppTypenames(e.getAcceptedTypes()),
", ") +
">",
37 simox::meta::get_type_name<type::dto::
Tuple>(),
42 std::vector<std::string>
45 std::vector<std::string>
ret;
49 ret = simox::alg::appended(
ret, child_s->getRequiredIncludes());
57 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
65 resolved_accessor +
")");
66 block_if_data->appendBlock(b2);
73 const std::string& cppAccessor,
75 std::string& variantAccessor)
const
77 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
82 const std::string acceptedTypesAccessor = variantAccessor +
"_tupleAcceptedTypes";
83 block_if_data->addLine(
"std::vector<_Aron_T> " + acceptedTypesAccessor +
";");
88 std::string accessor_iterator =
91 std::string nextVariantAccessor;
93 CppBlockPtr b2 = type_s->getWriteTypeBlock(type_s->getInstantiatedCppTypename(),
97 block_if_data->appendBlock(b2);
98 block_if_data->addLine(acceptedTypesAccessor +
".push_back(" + nextVariantAccessor +
102 ".writeTuple(" + acceptedTypesAccessor +
", " +
105 simox::alg::join(p.
getPath(),
", ") +
"})); // of " + cppAccessor);
106 return block_if_data;
112 std::string& variantAccessor)
const
114 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
119 const std::string elementsAccessor = variantAccessor +
"_tupleElements";
120 block_if_data->addLine(
"std::vector<_Aron_T> " + elementsAccessor +
";");
125 std::string accessor_iterator =
126 "std::get<" +
std::to_string(i) +
">(" + resolved_accessor +
");";
128 std::string nextVariantAccessor;
131 type_s->getWriteBlock(accessor_iterator, nextPath, nextVariantAccessor);
134 block_if_data->appendBlock(b2);
135 block_if_data->addLine(elementsAccessor +
".push_back(" + nextVariantAccessor +
");");
139 elementsAccessor +
", " +
"armarx::aron::Path(" +
141 "})); // of " + cppAccessor);
148 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
151 std::string elements_accessor =
154 block_if_data->addLine(
"std::vector<_Aron_TNonConst> " + elements_accessor +
";");
156 "); // of " + cppAccessor);
165 block_if_data->appendBlock(b2);