2 * SPDX-License-Identifier: MIT
4 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 #ifndef BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H
8 #define BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H
12 #include <babeltrace2-ctf-writer/visitor.h>
13 #include "common/macros.h"
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
,
20 struct bt_ctf_visitor_object
{
21 enum bt_ctf_visitor_object_type type
;
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
,
33 #endif /* BABELTRACE_CTF_WRITER_VISITOR_INTERNAL_H */