| 608 | } |
| 609 | |
| 610 | std::string TD_TL_writer_cpp::gen_store_function_begin(const std::string &storer_name, const std::string &class_name, |
| 611 | int arity, std::vector<tl::var_description> &vars, |
| 612 | int storer_type) const { |
| 613 | for (std::size_t i = 0; i < vars.size(); i++) { |
| 614 | vars[i].is_stored = false; |
| 615 | } |
| 616 | |
| 617 | if (storer_type == -1) { |
| 618 | return ""; |
| 619 | } |
| 620 | |
| 621 | assert(arity == 0); |
| 622 | return "\n" |
| 623 | "void " + |
| 624 | class_name + "::store(" + storer_name + " &s" + |
| 625 | std::string(storer_type <= 0 ? "" : ", const char *field_name") + ") const {\n" + |
| 626 | (storer_type <= 0 ? " (void)sizeof(s);\n" |
| 627 | : " if (!LOG_IS_STRIPPED(ERROR)) {\n" |
| 628 | " s.store_class_begin(field_name, \"" + |
| 629 | get_pretty_class_name(class_name) + "\");\n"); |
| 630 | } |
| 631 | |
| 632 | std::string TD_TL_writer_cpp::gen_store_function_end(const std::vector<tl::var_description> &vars, |
| 633 | int storer_type) const { |
nothing calls this directly
no outgoing calls
no test coverage detected