Move to kernel style SPDX license identifiers
[babeltrace.git] / src / ctf-writer / visitor.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 */
6
7 #ifndef BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H
8 #define BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H
9
10 #include <stdlib.h>
11 #include <stdint.h>
12 #include <babeltrace2-ctf-writer/visitor.h>
13 #include "common/macros.h"
14
15 typedef void *(*bt_ctf_child_accessor)(void *object, int index);
16 typedef int64_t (*bt_ctf_child_count_accessor)(void *object);
17 typedef int (*bt_ctf_child_visitor)(void *object, bt_ctf_visitor visitor,
18 void *data);
19
20 struct bt_ctf_visitor_object {
21 enum bt_ctf_visitor_object_type type;
22 void *object;
23 };
24
25 BT_HIDDEN
26 int bt_ctf_visitor_helper(struct bt_ctf_visitor_object *root,
27 bt_ctf_child_count_accessor child_counter,
28 bt_ctf_child_accessor child_accessor,
29 bt_ctf_child_visitor child_visitor,
30 bt_ctf_visitor visitor,
31 void *data);
32
33 #endif /* BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H */
This page took 0.029215 seconds and 4 git commands to generate.