27 #include <SimoxUtility/meta/type_name.h>
34 "std::vector<" + FromAronType(*e.getAcceptedType())->getFullInstantiatedCppTypename() +
36 "std::vector<" + FromAronType(*e.getAcceptedType())->getFullInstantiatedCppTypename() +
39 simox::meta::get_type_name<type::dto::
List>(),
44 std::vector<std::string>
48 return c->getRequiredIncludes();
54 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
55 block_if_data->addLine(cppAccessor +
nextEl() +
"clear();");
61 const std::string& cppAccessor,
63 std::string& variantAccessor)
const
70 std::string nextVariantAccessor;
72 CppBlockPtr b2 = type_s->getWriteTypeBlock(type_s->getInstantiatedCppTypename(),
73 cppAccessor +
nextEl() +
"accepted_type",
81 simox::alg::join(p.
getPath(),
", ") +
"})); // of " + cppAccessor);
88 std::string& variantAccessor)
const
90 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
94 const std::string elementsAccessor = variantAccessor +
"_listElements";
95 block_if_data->addLine(
"std::vector<_Aron_T> " + elementsAccessor +
";");
100 block_if_data->addLine(
"for(unsigned int " + accessor_iterator +
" = 0; " +
101 accessor_iterator +
" < " + cppAccessor +
nextEl() +
"size(); ++" +
102 accessor_iterator +
")");
104 std::string nextVariantAccessor;
105 auto for_loop = std::make_shared<CppBlock>();
106 Path nextPath = p.
withElement(
"std::to_string(" + accessor_iterator +
")");
108 type_s->getWriteBlock(cppAccessor +
nextEl() +
"at(" + accessor_iterator +
")",
110 nextVariantAccessor);
113 for_loop->appendBlock(child_b);
114 for_loop->addLine(elementsAccessor +
".push_back(" + nextVariantAccessor +
");");
115 block_if_data->addBlock(for_loop);
120 elementsAccessor +
", " +
"armarx::aron::Path(" +
122 "})); // of " + cppAccessor);
130 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
132 std::string elements_accessor =
134 std::string accessor_iterator_value =
137 block_if_data->addLine(
"std::vector<_Aron_TNonConst> " + elements_accessor +
";");
139 elements_accessor +
");");
140 block_if_data->addLine(
"for (const auto& " + accessor_iterator_value +
" : " +
141 elements_accessor +
")");
143 CppBlockPtr for_loop = std::make_shared<CppBlock>();
147 std::string accessor_iterator_tmp =
149 for_loop->addLine(type_s->getFullInstantiatedCppTypename() +
" " +
150 accessor_iterator_tmp +
";");
151 for_loop->appendBlock(
152 type_s->getReadBlock(accessor_iterator_tmp, accessor_iterator_value));
153 for_loop->addLine(cppAccessor +
nextEl() +
"push_back(" + accessor_iterator_tmp +
");");
154 block_if_data->addBlock(for_loop);