| 268 | } |
| 269 | |
| 270 | std::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 | |
| 288 | std::string TD_TL_writer_h::gen_fetch_function_end(bool has_parent, int field_num, |
| 289 | const std::vector<tl::var_description> &vars, |
nothing calls this directly
no outgoing calls
no test coverage detected