27 #include <SimoxUtility/meta/type_name.h>
28 #include <SimoxUtility/algorithm/vector.hpp>
34 "std::pair<" + ExtractCppTypename(*e.getFirstAcceptedType()) +
", " + ExtractCppTypename(*e.getSecondAcceptedType()) +
">",
35 "std::pair<" + ExtractCppTypename(*e.getFirstAcceptedType()) +
", " + ExtractCppTypename(*e.getSecondAcceptedType()) +
">",
37 simox::meta::get_type_name<type::dto::
Pair>(), e)
47 auto l1 = child_s1->getRequiredIncludes();
48 auto l2 = child_s2->getRequiredIncludes();
50 return simox::alg::appended(l1, l2);
55 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
60 block_if_data->appendBlock(b21);
64 block_if_data->appendBlock(b22);
70 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
75 std::string accessor_iterator1 = cppAccessor +
nextEl() +
"first";
76 std::string firstVariantAccessor;
78 CppBlockPtr b21 = child_s1->getWriteTypeBlock(child_s1->getInstantiatedCppTypename(), accessor_iterator1, firstPath, firstVariantAccessor);
79 block_if_data->appendBlock(b21);
82 std::string accessor_iterator2 = cppAccessor +
nextEl() +
"second";
83 std::string secondVariantAccessor;
85 CppBlockPtr b22 = child_s2->getWriteTypeBlock(child_s2->getInstantiatedCppTypename(), accessor_iterator2, secondPath, secondVariantAccessor);
86 block_if_data->appendBlock(b22);
88 block_if_data->addLine(
"auto " + variantAccessor +
" = " +
ARON_WRITER_ACCESSOR +
".writePair(" + firstVariantAccessor +
", " +
89 secondVariantAccessor +
", " +
97 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
102 std::string accessor_iterator1 = cppAccessor +
nextEl() +
"first";
103 std::string firstVariantAccessor;
105 CppBlockPtr b21 = child_s1->getWriteBlock(accessor_iterator1, firstPath, firstVariantAccessor);
106 block_if_data->addLine(
"auto " + firstVariantAccessor +
" = " +
ARON_WRITER_ACCESSOR +
".writeNull();");
107 block_if_data->appendBlock(b21);
110 std::string accessor_iterator2 = cppAccessor +
nextEl() +
"second";
111 std::string secondVariantAccessor;
113 CppBlockPtr b22 = child_s2->getWriteBlock(accessor_iterator2, secondPath, secondVariantAccessor);
114 block_if_data->addLine(
"auto " + secondVariantAccessor +
" = " +
ARON_WRITER_ACCESSOR +
".writeNull();");
115 block_if_data->appendBlock(b22);
117 block_if_data->addLine(variantAccessor +
" = " +
ARON_WRITER_ACCESSOR +
".writePair("+firstVariantAccessor+
", "+
118 secondVariantAccessor+
", " +
125 CppBlockPtr block_if_data = std::make_shared<CppBlock>();
127 std::string elements_accessor =
ARON_VARIABLE_PREFIX +
"_" + escaped_accessor +
"_pairElements";
129 block_if_data->addLine(
"std::vector<_Aron_TNonConst> " + elements_accessor +
";");
130 block_if_data->addLine(
"" +
ARON_READER_ACCESSOR +
".readList("+elements_accessor+
"); // of " + cppAccessor);
133 CppBlockPtr b21 = child_s1->getReadBlock(cppAccessor +
nextEl() +
"first", elements_accessor+
"[0]");
134 block_if_data->appendBlock(b21);
137 CppBlockPtr b22 = child_s2->getReadBlock(cppAccessor +
nextEl() +
"second", elements_accessor+
"[1]");
138 block_if_data->appendBlock(b22);