• Home
  • Raw
  • Download

Lines Matching refs:emitter

70 	emitter_t emitter;  in assert_emit_output()  local
78 emitter_init(&emitter, emitter_output_json, &forwarding_cb, in assert_emit_output()
80 (*emit_fn)(&emitter); in assert_emit_output()
87 emitter_init(&emitter, emitter_output_table, &forwarding_cb, in assert_emit_output()
89 (*emit_fn)(&emitter); in assert_emit_output()
94 emit_dict(emitter_t *emitter) { in emit_dict() argument
100 emitter_begin(emitter); in emit_dict()
101 emitter_dict_begin(emitter, "foo", "This is the foo table:"); in emit_dict()
102 emitter_kv(emitter, "abc", "ABC", emitter_type_bool, &b_false); in emit_dict()
103 emitter_kv(emitter, "def", "DEF", emitter_type_bool, &b_true); in emit_dict()
104 emitter_kv_note(emitter, "ghi", "GHI", emitter_type_int, &i_123, in emit_dict()
106 emitter_kv_note(emitter, "jkl", "JKL", emitter_type_string, &str, in emit_dict()
108 emitter_dict_end(emitter); in emit_dict()
109 emitter_end(emitter); in emit_dict()
133 emit_table_printf(emitter_t *emitter) { in emit_table_printf() argument
134 emitter_begin(emitter); in emit_table_printf()
135 emitter_table_printf(emitter, "Table note 1\n"); in emit_table_printf()
136 emitter_table_printf(emitter, "Table note 2 %s\n", in emit_table_printf()
138 emitter_end(emitter); in emit_table_printf()
155 static void emit_nested_dict(emitter_t *emitter) { in emit_nested_dict() argument
157 emitter_begin(emitter); in emit_nested_dict()
158 emitter_dict_begin(emitter, "json1", "Dict 1"); in emit_nested_dict()
159 emitter_dict_begin(emitter, "json2", "Dict 2"); in emit_nested_dict()
160 emitter_kv(emitter, "primitive", "A primitive", emitter_type_int, &val); in emit_nested_dict()
161 emitter_dict_end(emitter); /* Close 2 */ in emit_nested_dict()
162 emitter_dict_begin(emitter, "json3", "Dict 3"); in emit_nested_dict()
163 emitter_dict_end(emitter); /* Close 3 */ in emit_nested_dict()
164 emitter_dict_end(emitter); /* Close 1 */ in emit_nested_dict()
165 emitter_dict_begin(emitter, "json4", "Dict 4"); in emit_nested_dict()
166 emitter_kv(emitter, "primitive", "Another primitive", in emit_nested_dict()
168 emitter_dict_end(emitter); /* Close 4 */ in emit_nested_dict()
169 emitter_end(emitter); in emit_nested_dict()
201 emit_types(emitter_t *emitter) { in emit_types() argument
211 emitter_begin(emitter); in emit_types()
212 emitter_kv(emitter, "k1", "K1", emitter_type_bool, &b); in emit_types()
213 emitter_kv(emitter, "k2", "K2", emitter_type_int, &i); in emit_types()
214 emitter_kv(emitter, "k3", "K3", emitter_type_unsigned, &u); in emit_types()
215 emitter_kv(emitter, "k4", "K4", emitter_type_ssize, &zd); in emit_types()
216 emitter_kv(emitter, "k5", "K5", emitter_type_size, &zu); in emit_types()
217 emitter_kv(emitter, "k6", "K6", emitter_type_string, &str); in emit_types()
218 emitter_kv(emitter, "k7", "K7", emitter_type_uint32, &u32); in emit_types()
219 emitter_kv(emitter, "k8", "K8", emitter_type_uint64, &u64); in emit_types()
224 emitter_end(emitter); in emit_types()
255 emit_modal(emitter_t *emitter) { in emit_modal() argument
257 emitter_begin(emitter); in emit_modal()
258 emitter_dict_begin(emitter, "j0", "T0"); in emit_modal()
259 emitter_json_dict_begin(emitter, "j1"); in emit_modal()
260 emitter_kv(emitter, "i1", "I1", emitter_type_int, &val); in emit_modal()
261 emitter_json_kv(emitter, "i2", emitter_type_int, &val); in emit_modal()
262 emitter_table_kv(emitter, "I3", emitter_type_int, &val); in emit_modal()
263 emitter_table_dict_begin(emitter, "T1"); in emit_modal()
264 emitter_kv(emitter, "i4", "I4", emitter_type_int, &val); in emit_modal()
265 emitter_json_dict_end(emitter); /* Close j1 */ in emit_modal()
266 emitter_kv(emitter, "i5", "I5", emitter_type_int, &val); in emit_modal()
267 emitter_table_dict_end(emitter); /* Close T1 */ in emit_modal()
268 emitter_kv(emitter, "i6", "I6", emitter_type_int, &val); in emit_modal()
269 emitter_dict_end(emitter); /* Close j0 / T0 */ in emit_modal()
270 emitter_end(emitter); in emit_modal()
301 emit_json_arr(emitter_t *emitter) { in emit_json_arr() argument
304 emitter_begin(emitter); in emit_json_arr()
305 emitter_json_dict_begin(emitter, "dict"); in emit_json_arr()
306 emitter_json_arr_begin(emitter, "arr"); in emit_json_arr()
307 emitter_json_arr_obj_begin(emitter); in emit_json_arr()
308 emitter_json_kv(emitter, "foo", emitter_type_int, &ival); in emit_json_arr()
309 emitter_json_arr_obj_end(emitter); /* Close arr[0] */ in emit_json_arr()
311 emitter_json_arr_value(emitter, emitter_type_int, &ival); in emit_json_arr()
312 emitter_json_arr_value(emitter, emitter_type_int, &ival); in emit_json_arr()
313 emitter_json_arr_obj_begin(emitter); in emit_json_arr()
314 emitter_json_kv(emitter, "bar", emitter_type_int, &ival); in emit_json_arr()
315 emitter_json_kv(emitter, "baz", emitter_type_int, &ival); in emit_json_arr()
316 emitter_json_arr_obj_end(emitter); /* Close arr[3]. */ in emit_json_arr()
317 emitter_json_arr_end(emitter); /* Close arr. */ in emit_json_arr()
318 emitter_json_dict_end(emitter); /* Close dict. */ in emit_json_arr()
319 emitter_end(emitter); in emit_json_arr()
347 emit_table_row(emitter_t *emitter) { in emit_table_row() argument
348 emitter_begin(emitter); in emit_table_row()
362 emitter_table_row(emitter, &row); in emit_table_row()
371 emitter_table_row(emitter, &row); in emit_table_row()
376 emitter_table_row(emitter, &row); in emit_table_row()
383 emitter_table_row(emitter, &row); in emit_table_row()
385 emitter_end(emitter); in emit_table_row()