27 #include <SimoxUtility/meta/type_name.h>
28 #include <SimoxUtility/algorithm/vector.hpp>
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>(), e)
44 std::vector<std::string>
ret;
48 ret = simox::alg::appended(
ret, child_s->getRequiredIncludes());
55 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
63 block_if_data->appendBlock(b2);
70 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
75 const std::string acceptedTypesAccessor = variantAccessor +
"_tupleAcceptedTypes";
76 block_if_data->addLine(
"std::vector<_Aron_T> " + acceptedTypesAccessor +
";");
81 std::string accessor_iterator =
"std::get<" +
std::to_string(i) +
">("+resolved_accessor+
");";
83 std::string nextVariantAccessor;
85 CppBlockPtr b2 = type_s->getWriteTypeBlock(type_s->getInstantiatedCppTypename(), accessor_iterator, nextPath, nextVariantAccessor);
86 block_if_data->appendBlock(b2);
87 block_if_data->addLine(acceptedTypesAccessor +
".push_back(" + nextVariantAccessor +
");");
89 block_if_data->addLine(
"auto " + variantAccessor +
" = " +
ARON_WRITER_ACCESSOR +
".writeTuple(" + acceptedTypesAccessor +
", " +
97 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
102 const std::string elementsAccessor = variantAccessor +
"_tupleElements";
103 block_if_data->addLine(
"std::vector<_Aron_T> " + elementsAccessor +
";");
108 std::string accessor_iterator =
"std::get<" +
std::to_string(i) +
">("+resolved_accessor+
");";
110 std::string nextVariantAccessor;
112 CppBlockPtr b2 = type_s->getWriteBlock(accessor_iterator, nextPath, nextVariantAccessor);
113 block_if_data->addLine(
"auto " + nextVariantAccessor +
" = " +
ARON_WRITER_ACCESSOR +
".writeNull();");
114 block_if_data->appendBlock(b2);
115 block_if_data->addLine(elementsAccessor +
".push_back(" + nextVariantAccessor +
");");
118 block_if_data->addLine(variantAccessor+
" = " +
ARON_WRITER_ACCESSOR +
".writeTuple("+elementsAccessor+
", "+
125 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
128 std::string elements_accessor =
ARON_VARIABLE_PREFIX +
"_" + escaped_accessor +
"_tupleElements";
130 block_if_data->addLine(
"std::vector<_Aron_TNonConst> " + elements_accessor +
";");
131 block_if_data->addLine(
"" +
ARON_READER_ACCESSOR +
".readList("+elements_accessor+
"); // of " + cppAccessor);
138 block_if_data->appendBlock(b2);