MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / gen_store_function_begin

Method gen_store_function_begin

tl/generate/tl_writer_cpp.cpp:610–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610std::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
632std::string TD_TL_writer_cpp::gen_store_function_end(const std::vector<tl::var_description> &vars,
633 int storer_type) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected