| 321 | } |
| 322 | |
| 323 | std::string TD_TL_writer_cpp::gen_vector_store(const std::string &field_name, const tl::tl_tree_type *t, |
| 324 | const std::vector<tl::var_description> &vars, int storer_type) const { |
| 325 | std::string num = field_name.back() == ']' ? "2" : ""; |
| 326 | return "{ const std::vector<" + gen_type_name(t) + "> &v" + num + " = " + field_name + |
| 327 | "; const std::uint32_t multiplicity" + num + " = static_cast<std::uint32_t>(v" + num + |
| 328 | ".size()); const auto vector_name" + num + " = \"" + get_pretty_class_name("vector") + |
| 329 | "[\" + td::to_string(multiplicity" + num + ")+ \"]\"; s.store_class_begin(\"" + |
| 330 | get_pretty_field_name(field_name) + "\", vector_name" + num + |
| 331 | ".c_str()); " |
| 332 | "for (std::uint32_t i" + |
| 333 | num + " = 0; i" + num + " < multiplicity" + num + "; i" + num + "++) { " + |
| 334 | gen_type_store("v" + num + "[i" + num + "]", t, vars, storer_type) + " } s.store_class_end(); }"; |
| 335 | } |
| 336 | |
| 337 | std::string TD_TL_writer_cpp::gen_store_class_name(const tl::tl_tree_type *tree_type) const { |
| 338 | const tl::tl_type *t = tree_type->type; |
nothing calls this directly
no outgoing calls
no test coverage detected