Move to kernel style SPDX license identifiers
[babeltrace.git] / src / ctf-writer / field-path.h
CommitLineData
16ca5ff0 1/*
0235b0db 2 * SPDX-License-Identifier: MIT
16ca5ff0 3 *
0235b0db 4 * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
16ca5ff0
PP
5 *
6 * The Common Trace Format (CTF) Specification is available at
7 * http://www.efficios.com/ctf
8 */
9
0235b0db
MJ
10#ifndef BABELTRACE_CTF_WRITER_FIELD_PATH_INTERNAL
11#define BABELTRACE_CTF_WRITER_FIELD_PATH_INTERNAL
12
578e048b
MJ
13#include "common/common.h"
14#include "common/assert.h"
91d81473 15#include "common/macros.h"
217cf9d3 16#include <babeltrace2-ctf-writer/field-types.h>
16ca5ff0
PP
17#include <glib.h>
18
578e048b
MJ
19#include "object.h"
20
16ca5ff0 21struct bt_ctf_field_path {
e1e02a22 22 struct bt_ctf_object base;
16ca5ff0
PP
23 enum bt_ctf_scope root;
24
25 /*
26 * Array of integers (int) indicating the index in either
27 * structures, variants, arrays, or sequences that make up
28 * the path to a field type. -1 means the "current element
29 * of an array or sequence type".
30 */
31 GArray *indexes;
32};
33
34BT_HIDDEN
35struct bt_ctf_field_path *bt_ctf_field_path_create(void);
36
37BT_HIDDEN
38void bt_ctf_field_path_clear(struct bt_ctf_field_path *field_path);
39
40BT_HIDDEN
41struct bt_ctf_field_path *bt_ctf_field_path_copy(
42 struct bt_ctf_field_path *path);
43
44BT_HIDDEN enum bt_ctf_scope bt_ctf_field_path_get_root_scope(
45 const struct bt_ctf_field_path *field_path);
46
47BT_HIDDEN int64_t bt_ctf_field_path_get_index_count(
48 const struct bt_ctf_field_path *field_path);
49
50BT_HIDDEN int bt_ctf_field_path_get_index(
51 const struct bt_ctf_field_path *field_path, uint64_t index);
52
53#endif /* BABELTRACE_CTF_WRITER_FIELD_PATH_INTERNAL */
This page took 0.063732 seconds and 4 git commands to generate.