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

Method gen_fetch_function_begin

tl/generate/tl_writer_h.cpp:270–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270std::string TD_TL_writer_h::gen_fetch_function_begin(const std::string &parser_name, const std::string &class_name,
271 const std::string &parent_class_name, int arity,
272 std::vector<tl::var_description> &vars, int parser_type) const {
273 std::string returned_type = "object_ptr<" + parent_class_name + "> ";
274
275 if (parser_type == 0) {
276 return "\n"
277 " static " +
278 returned_type + "fetch(" + parser_name + " &p);\n\n" + " explicit " + class_name + "(" + parser_name +
279 " &p);\n";
280 }
281
282 assert(arity == 0);
283 return "\n"
284 " static " +
285 returned_type + "fetch(" + parser_name + " &p);\n";
286}
287
288std::string TD_TL_writer_h::gen_fetch_function_end(bool has_parent, int field_num,
289 const std::vector<tl::var_description> &vars,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected