Home
last modified time | relevance | path

Searched refs:t_field (Results 1 – 25 of 50) sorted by relevance

12

/thrift-3.4.0/compiler/cpp/src/thrift/parse/
Dt_struct.h41 typedef std::vector<t_field*> members_type;
87 bool append(t_field* elem) { in append()
92 t_field::key_compare()); in append()
120 t_field* get_field_by_name(std::string field_name) { in get_field_by_name()
121 return const_cast<t_field*>(const_cast<const t_struct&>(*this).get_field_by_name(field_name)); in get_field_by_name()
124 const t_field* get_field_by_name(std::string field_name) const { in get_field_by_name()
146 void validate_member_field(t_field* field) { in validate_member_field()
151 void validate_union_member(t_field* field) { in validate_union_member()
157 if (field->get_req() != t_field::T_OPTIONAL) { in validate_union_member()
159 if(field->get_req() != t_field::T_OPT_IN_REQ_OUT) { in validate_union_member()
[all …]
Dt_field.h38 class t_field : public t_doc {
40 t_field(t_type* type, std::string name) in t_field() function
51 t_field(t_type* type, std::string name, int32_t key) in t_field() function
62 ~t_field() override = default;
104 bool operator()(t_field const* const& a, t_field const* const& b) { in operator()
/thrift-3.4.0/compiler/cpp/src/thrift/generate/
Dt_netstd_generator.h87 void generate_property(ostream& out, t_field* tfield, bool isPublic, bool generateIsset);
88 …void generate_netstd_property(ostream& out, t_field* tfield, bool isPublic, bool includeIsset = tr…
97 void generate_netstd_union_class(ostream& out, t_struct* tunion, t_field* tfield);
114 …void generate_deserialize_field(ostream& out, t_field* tfield, string prefix = "", bool is_propert…
120 …void generate_serialize_field(ostream& out, t_field* tfield, string prefix = "", bool is_propertyl…
126 void generate_netstd_doc(ostream& out, t_field* field);
143 …string declare_field(t_field* tfield, bool init = false, bool allow_nullable = true, string prefix…
148 string prop_name(t_field* tfield, bool suppress_mapping = false);
208 …void prepare_member_name_mapping(t_struct* scope, const vector<t_field*>& members, const string& s…
218 void generate_null_check_begin(ostream& out, t_field* tfield);
[all …]
Dt_swift_generator.cc189 string declare_property(t_field* tfield, bool is_private);
239 bool field_is_optional(t_field* tfield) { in field_is_optional()
240 bool opt = tfield->get_req() == t_field::T_OPTIONAL; in field_is_optional()
241 …find("swift.nullable") != tfield->annotations_.end() && tfield->get_req() != t_field::T_REQUIRED) { in field_is_optional()
245 opt = tfield->get_req() == t_field::T_OPTIONAL; in field_is_optional()
251 const vector<t_field*>& members = tstruct->get_members(); in struct_has_required_fields()
252 vector<t_field*>::const_iterator m_iter; in struct_has_required_fields()
262 const vector<t_field*>& members = tstruct->get_members(); in struct_has_optional_fields()
263 vector<t_field*>::const_iterator m_iter; in struct_has_optional_fields()
679 const vector<t_field*>& members = tstruct->get_members(); in generate_swift_struct()
[all …]
Dt_rs_generator.cc203 t_field *tfield,
204 t_field::e_req req);
268 string struct_field_read_temp_variable(t_field* tfield);
422 t_field::e_req actual_field_req(t_field* tfield, t_rs_generator::e_struct_type struct_type);
426 bool is_optional(t_field::e_req req);
451 string rust_field_name(t_field* tstruct);
455 string rust_union_field_name(t_field* tstruct);
1042 const vector<t_field*> members = tstruct->get_sorted_members(); in render_struct_definition()
1043 vector<t_field*>::const_iterator members_iter; in render_struct_definition()
1046 t_field* member = *members_iter; in render_struct_definition()
[all …]
Dt_dart_generator.cc179 std::string init_value(t_field* tfield);
186 std::string generate_isset_check(t_field* field);
188 void generate_isset_set(ostream& out, t_field* field);
200 void generate_deserialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
214 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
243 std::string declare_field(t_field* tfield, bool init = false);
596 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in print_const_value()
597 vector<t_field*>::const_iterator f_iter; in print_const_value()
791 const vector<t_field*>& members = tstruct->get_members(); in generate_dart_struct_definition()
792 vector<t_field*>::const_iterator m_iter; in generate_dart_struct_definition()
[all …]
Dt_lua_generator.cc109 t_field* tfield,
135 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
287 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
288 vector<t_field*>::const_iterator f_iter; in render_const_value()
382 vector<t_field*>::const_iterator m_iter; in generate_lua_struct_definition()
383 const vector<t_field*>& members = tstruct->get_members(); in generate_lua_struct_definition()
416 const vector<t_field*>& fields = tstruct->get_members(); in generate_lua_struct_reader()
417 vector<t_field*>::const_iterator f_iter; in generate_lua_struct_reader()
473 const vector<t_field*>& fields = tstruct->get_members(); in generate_lua_struct_writer()
474 vector<t_field*>::const_iterator f_iter; in generate_lua_struct_writer()
[all …]
Dt_php_generator.cc156 int get_php_num_required_fields(const vector<t_field*>& fields, bool write_mode);
186 t_field* tfield,
202 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
219 void generate_php_doc(std::ostream& out, t_field* tfield);
230 std::string declare_field(t_field* tfield, bool init = false, bool obj = false);
684 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
685 vector<t_field*>::const_iterator f_iter; in render_const_value()
830 const vector<t_field*>& members = tstruct->get_members(); in generate_php_struct_spec()
831 vector<t_field*>::const_iterator m_iter; in generate_php_struct_spec()
837 …out << indent() << "'isRequired' => " << ((*m_iter)->get_req() == t_field::T_REQUIRED ? "true" : "… in generate_php_struct_spec()
[all …]
Dt_javame_generator.cc130 std::string generate_isset_check(t_field* field);
132 void generate_isset_set(ostream& out, t_field* field);
133 std::string isset_field_id(t_field* field);
160 void generate_deserialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
174 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
189 void generate_java_doc(std::ostream& out, t_field* field) override;
221 std::string declare_field(t_field* tfield, bool init = false);
456 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in print_const_value()
457 vector<t_field*>::const_iterator f_iter; in print_const_value()
722 const vector<t_field*>& members = tstruct->get_members(); in generate_union_constructor()
[all …]
Dt_ocaml_generator.cc82 bool struct_member_persistent(t_field* tmember);
83 bool struct_member_omitable(t_field* tmember);
84 bool struct_member_default_cheaply_comparable(t_field* tmember);
95 void generate_ocaml_struct_member(std::ostream& out, string tname, t_field* tmember);
100 void generate_ocaml_method_copy(std::ostream& out, const vector<t_field*>& members);
101 void generate_ocaml_member_copy(std::ostream& out, t_field* member);
117 void generate_deserialize_field(std::ostream& out, t_field* tfield, std::string prefix);
130 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string name = "");
402 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
403 vector<t_field*>::const_iterator f_iter; in render_const_value()
[all …]
Dt_oop_generator.h72 virtual void generate_java_doc(std::ostream& out, t_field* field) { in generate_java_doc()
98 const std::vector<t_field*>& fields = tfunction->get_arglist()->get_members(); in generate_java_doc()
99 std::vector<t_field*>::const_iterator p_iter; in generate_java_doc()
101 t_field* p = *p_iter; in generate_java_doc()
Dt_perl_generator.cc115 t_field* tfield,
131 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
151 std::string declare_field(t_field* tfield, bool init = false, bool obj = false);
361 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
362 vector<t_field*>::const_iterator f_iter; in render_const_value()
460 const vector<t_field*>& members = tstruct->get_members(); in generate_perl_struct_definition()
461 vector<t_field*>::const_iterator m_iter; in generate_perl_struct_definition()
536 const vector<t_field*>& fields = tstruct->get_members(); in generate_perl_struct_reader()
537 vector<t_field*>::const_iterator f_iter; in generate_perl_struct_reader()
607 const vector<t_field*>& fields = tstruct->get_sorted_members(); in generate_perl_struct_writer()
[all …]
Dt_rb_generator.cc160 t_field* tfield,
176 void generate_serialize_field(t_rb_ofstream& out, t_field* tfield, std::string prefix = "");
200 std::string declare_field(t_field* tfield);
459 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
460 vector<t_field*>::const_iterator f_iter; in render_const_value()
628 const vector<t_field*>& fields = tstruct->get_members(); in generate_field_constructors()
629 vector<t_field*>::const_iterator f_iter; in generate_field_constructors()
650 const vector<t_field*>& members = tstruct->get_members(); in generate_rb_simple_exception_constructor()
653 vector<t_field*>::const_iterator m_iter = members.begin(); in generate_rb_simple_exception_constructor()
673 const vector<t_field*>& fields = tstruct->get_members(); in generate_field_constants()
[all …]
Dt_java_generator.cc196 void generate_metadata_for_field_annotations(std::ostream& out, t_field* field);
215 std::string generate_isset_check(t_field* field);
217 void generate_isset_set(ostream& out, t_field* field, std::string prefix);
218 std::string isset_field_id(t_field* field);
266 t_field* tfield,
296 t_field* tfield,
351 std::string declare_field(t_field* tfield, bool init = false, bool comment = false);
703 const vector<t_field*>& unsorted_fields = ((t_struct*)type)->get_members(); in print_const_value()
704 vector<t_field*> fields = unsorted_fields; in print_const_value()
705 std::sort(fields.begin(), fields.end(), t_field::key_compare()); in print_const_value()
[all …]
Dt_haxe_generator.cc151 std::string generate_isset_check(t_field* field);
153 void generate_isset_set(ostream& out, t_field* field);
167 void generate_deserialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
176 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
203 std::string declare_field(t_field* tfield, bool init = false);
348 const vector<t_field*>& members = tstruct->get_members(); in haxe_thrift_gen_imports()
349 vector<t_field*>::const_iterator m_iter; in haxe_thrift_gen_imports()
598 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_struct_initializer()
599 vector<t_field*>::const_iterator f_iter; in render_struct_initializer()
768 const vector<t_field*>& members = tstruct->get_members(); in generate_haxe_struct_definition()
[all …]
Dt_py_generator.cc206 t_field* tfield,
221 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
254 std::string declare_argument(t_field* tfield);
255 std::string render_field_default_value(t_field* tfield);
617 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
618 vector<t_field*>::const_iterator f_iter; in render_const_value()
742 const vector<t_field*>& sorted_members = tstruct->get_sorted_members(); in generate_py_thrift_spec()
743 vector<t_field*>::const_iterator m_iter; in generate_py_thrift_spec()
785 const vector<t_field*>& members = tstruct->get_members(); in generate_py_struct_definition()
786 const vector<t_field*>& sorted_members = tstruct->get_sorted_members(); in generate_py_struct_definition()
[all …]
Dt_d_generator.cc252 const vector<t_field*>& exceptions = (*fn_iter)->get_xceptions()->get_members(); in generate_service()
253 vector<t_field*>::const_iterator ex_iter; in generate_service()
291 const vector<t_field*>& params = (*fn_iter)->get_arglist()->get_members(); in generate_service()
292 vector<t_field*>::const_iterator p_iter; in generate_service()
315 const vector<t_field*>& exceptions = (*fn_iter)->get_xceptions()->get_members(); in generate_service()
316 vector<t_field*>::const_iterator ex_iter; in generate_service()
439 const vector<t_field*>& members = tstruct->get_members(); in print_struct_definition()
449 vector<t_field*>::const_iterator m_iter; in print_struct_definition()
467 vector<t_field*>::const_iterator m_iter; in print_struct_definition()
479 t_field::e_req req = (*m_iter)->get_req(); in print_struct_definition()
[all …]
Dt_netstd_generator.cc99 static bool field_has_default(t_field* tfield) { return tfield->get_value() != nullptr; } in field_has_default()
101 static bool field_is_required(t_field* tfield) { return tfield->get_req() == t_field::T_REQUIRED; } in field_is_required()
378 const vector<t_field*>& fields = static_cast<t_struct*>(type)->get_members(); in print_const_def_value()
380 vector<t_field*>::const_iterator f_iter; in print_const_def_value()
387 t_field* field = nullptr; in print_const_def_value()
565 const vector<t_field*>& members = tstruct->get_members(); in collect_extensions_types()
566 vector<t_field*>::const_iterator m_iter; in collect_extensions_types()
838 const vector<t_field*>& members = tstruct->get_members(); in generate_netstd_struct_definition()
839 vector<t_field*>::const_iterator m_iter; in generate_netstd_struct_definition()
1036 const vector<t_field*>& members = tstruct->get_members(); in generate_netstd_wcffault()
[all …]
Dt_delphi_generator.cc122 void generate_property(ostream& out, t_field* tfield, bool isPublic, bool is_xception);
123 void generate_property_writer_(ostream& out, t_field* tfield, bool isPublic);
127 t_field* tfield,
130 …void generate_delphi_isset_reader_writer_definition(ostream& out, t_field* tfield, bool is_xceptio…
132 t_field* tfield,
135 t_field* tfield,
141 t_field* tfield,
148 t_field* tfield,
158 t_field* tfield,
168 t_field* tfield,
[all …]
Dt_xsd_generator.cc143 vector<t_field*>::const_iterator m_iter; in generate_struct()
144 const vector<t_field*>& members = tstruct->get_members(); in generate_struct()
213 const vector<t_field*>& members = attrs->get_members(); in generate_element()
214 vector<t_field*>::const_iterator a_iter; in generate_element()
241 const vector<t_field*>& members = attrs->get_members(); in generate_element()
242 vector<t_field*>::const_iterator a_iter; in generate_element()
298 const std::vector<t_field*>& xceptions = xs->get_members(); in generate_service()
299 vector<t_field*>::const_iterator x_iter; in generate_service()
Dt_go_generator.cc67 bool t_go_generator::omit_initialization(t_field* tfield) { in omit_initialization()
123 bool t_go_generator::is_pointer_field(t_field* tfield, bool in_container_value) { in is_pointer_field()
133 if (!(tfield->get_req() == t_field::T_OPTIONAL)) { in is_pointer_field()
1062 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
1063 vector<t_field*>::const_iterator f_iter; in render_const_value()
1167 void t_go_generator::get_publicized_name_and_def_value(t_field* tfield, in get_publicized_name_and_def_value()
1180 const vector<t_field*>& members = tstruct->get_members(); in generate_go_struct_initializer()
1206 const vector<t_field*>& members = tstruct->get_members(); in generate_go_struct_definition()
1207 const vector<t_field*>& sorted_members = tstruct->get_sorted_members(); in generate_go_struct_definition()
1208 vector<t_field*>::const_iterator m_iter; in generate_go_struct_definition()
[all …]
Dt_st_generator.cc142 std::string declare_field(t_field* tfield);
404 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
405 vector<t_field*>::const_iterator f_iter; in render_const_value()
497 const vector<t_field*>& members = tstruct->get_members(); in generate_st_struct()
498 vector<t_field*>::const_iterator m_iter; in generate_st_struct()
547 const vector<t_field*>& members = tstruct->get_members(); in generate_accessors()
548 vector<t_field*>::const_iterator m_iter; in generate_accessors()
708 const vector<t_field*>& fields = tstruct->get_sorted_members(); in struct_writer()
709 vector<t_field*>::const_iterator fld_iter; in struct_writer()
716 bool optional = (*fld_iter)->get_req() == t_field::T_OPTIONAL; in struct_writer()
[all …]
Dt_erl_generator.cc102 std::string render_member_type(t_field* field);
103 std::string render_member_value(t_field* field);
104 std::string render_member_requiredness(t_field* field);
107 std::string render_default_value(t_field* field);
117 void generate_erl_struct_member(std::ostream& out, t_field* tmember);
179 bool has_default_value(t_field*);
624 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
625 vector<t_field*>::const_iterator f_iter; in render_const_value()
709 string t_erl_generator::render_default_value(t_field* field) { in render_default_value()
728 string t_erl_generator::render_member_type(t_field* field) { in render_member_type()
[all …]
Dt_cpp_generator.cc187 t_field* tfield,
209 t_field* tfield,
240 std::string declare_field(t_field* tfield,
268 bool is_reference(t_field* tfield) { return tfield->get_reference(); } in is_reference()
789 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in print_const_value()
790 vector<t_field*>::const_iterator f_iter; in print_const_value()
800 is_nonrequired_field = (*f_iter)->get_req() != t_field::T_REQUIRED; in print_const_value()
981 const vector<t_field*>& members = tstruct->get_members(); in generate_constructor_helper()
987 vector<t_field*>::const_iterator f_iter; in generate_constructor_helper()
990 if ((*f_iter)->get_req() != t_field::T_REQUIRED) in generate_constructor_helper()
[all …]
Dt_js_generator.cc181 t_field* tfield,
197 void generate_serialize_field(std::ostream& out, t_field* tfield, std::string prefix = "");
222 std::string declare_field(t_field* tfield, bool init = false, bool obj = false);
229 …std::string next_identifier_name(std::vector<t_field*> const& fields, std::string const& base_name…
230 bool find_field(std::vector<t_field*> const& fields, std::string const& name);
333 …string ts_get_req(t_field* field) {return (field->get_req() == t_field::T_OPTIONAL || field->get_v… in ts_get_req()
741 const vector<t_field*>& fields = ((t_struct*)type)->get_members(); in render_const_value()
742 vector<t_field*>::const_iterator f_iter; in render_const_value()
858 const vector<t_field*>& members = tstruct->get_members(); in generate_js_struct_definition()
859 vector<t_field*>::const_iterator m_iter; in generate_js_struct_definition()
[all …]

12