Fix: lib: Mismatch in function declarations and definitions
[deliverable/babeltrace.git] / include / babeltrace / trace-ir / field-class.h
CommitLineData
c82deff2
PP
1#ifndef BABELTRACE_TRACE_IR_FIELD_CLASSES_H
2#define BABELTRACE_TRACE_IR_FIELD_CLASSES_H
3
4/*
0554db57 5 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
c82deff2
PP
6 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 *
c82deff2
PP
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 *
26 * The Common Trace Format (CTF) Specification is available at
27 * http://www.efficios.com/ctf
28 */
29
0e84d7cc 30/* For bt_bool, bt_field_class, bt_trace_class */
c82deff2
PP
31#include <babeltrace/types.h>
32
36a0a6ef 33/*
b7c5b62e
PP
34 * For bt_field_class_status,
35 * bt_field_class_integer_preferred_display_base
36a0a6ef 36 */
c319d0ae 37#include <babeltrace/trace-ir/field-class-const.h>
dadf29b9 38
c82deff2
PP
39#include <stdint.h>
40#include <stddef.h>
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
0e84d7cc
PP
46extern bt_field_class *bt_field_class_unsigned_integer_create(
47 bt_trace_class *trace_class);
c82deff2 48
0e84d7cc
PP
49extern bt_field_class *bt_field_class_signed_integer_create(
50 bt_trace_class *trace_class);
dadf29b9
PP
51
52extern void bt_field_class_integer_set_field_value_range(
b9879703 53 bt_field_class *field_class, uint64_t size);
dadf29b9
PP
54
55extern void bt_field_class_integer_set_preferred_display_base(
b9879703 56 bt_field_class *field_class,
b7c5b62e 57 bt_field_class_integer_preferred_display_base base);
dadf29b9 58
0e84d7cc 59extern bt_field_class *bt_field_class_real_create(bt_trace_class *trace_class);
dadf29b9
PP
60
61extern void bt_field_class_real_set_is_single_precision(
b9879703 62 bt_field_class *field_class,
dadf29b9
PP
63 bt_bool is_single_precision);
64
0e84d7cc
PP
65extern bt_field_class *bt_field_class_unsigned_enumeration_create(
66 bt_trace_class *trace_class);
dadf29b9 67
0e84d7cc
PP
68extern bt_field_class *bt_field_class_signed_enumeration_create(
69 bt_trace_class *trace_class);
dadf29b9 70
b7c5b62e 71extern bt_field_class_status bt_field_class_unsigned_enumeration_map_range(
b9879703 72 bt_field_class *field_class, const char *label,
dadf29b9
PP
73 uint64_t range_lower, uint64_t range_upper);
74
b7c5b62e 75extern bt_field_class_status bt_field_class_signed_enumeration_map_range(
b9879703 76 bt_field_class *field_class, const char *label,
dadf29b9
PP
77 int64_t range_lower, int64_t range_upper);
78
0e84d7cc
PP
79extern bt_field_class *bt_field_class_string_create(
80 bt_trace_class *trace_class);
dadf29b9 81
0e84d7cc
PP
82extern bt_field_class *bt_field_class_structure_create(
83 bt_trace_class *trace_class);
dadf29b9 84
b7c5b62e 85extern bt_field_class_status bt_field_class_structure_append_member(
b9879703
PP
86 bt_field_class *struct_field_class,
87 const char *name, bt_field_class *field_class);
dadf29b9 88
4cbed8e8
PP
89extern bt_field_class_structure_member *
90bt_field_class_structure_borrow_member_by_index(
91 bt_field_class *field_class, uint64_t index);
8f16d5b7 92
4cbed8e8
PP
93extern bt_field_class_structure_member *
94bt_field_class_structure_borrow_member_by_name(
8f16d5b7
PP
95 bt_field_class *field_class, const char *name);
96
b9879703 97extern bt_field_class *bt_field_class_static_array_create(
0e84d7cc 98 bt_trace_class *trace_class,
b9879703 99 bt_field_class *elem_field_class, uint64_t length);
dadf29b9 100
b9879703 101extern bt_field_class *bt_field_class_dynamic_array_create(
0e84d7cc 102 bt_trace_class *trace_class,
b9879703 103 bt_field_class *elem_field_class);
dadf29b9 104
8f16d5b7
PP
105extern bt_field_class *bt_field_class_array_borrow_element_field_class(
106 bt_field_class *field_class);
107
b7c5b62e 108extern bt_field_class_status
36a0a6ef 109bt_field_class_dynamic_array_set_length_field_class(
b9879703
PP
110 bt_field_class *field_class,
111 bt_field_class *length_field_class);
dadf29b9 112
0e84d7cc
PP
113extern bt_field_class *bt_field_class_variant_create(
114 bt_trace_class *trace_class);
dadf29b9 115
b7c5b62e 116extern bt_field_class_status
36a0a6ef 117bt_field_class_variant_set_selector_field_class(bt_field_class *field_class,
b9879703 118 bt_field_class *selector_field_class);
dadf29b9 119
b7c5b62e 120extern bt_field_class_status bt_field_class_variant_append_option(
b9879703
PP
121 bt_field_class *var_field_class,
122 const char *name, bt_field_class *field_class);
c82deff2 123
4cbed8e8
PP
124extern bt_field_class_variant_option *
125bt_field_class_variant_borrow_option_by_index(
126 bt_field_class *field_class, uint64_t index);
8f16d5b7 127
4cbed8e8
PP
128extern bt_field_class_variant_option *
129bt_field_class_variant_borrow_option_by_name(
23b19ebe 130 bt_field_class *field_class, const char *name);
4cbed8e8
PP
131
132extern bt_field_class *bt_field_class_variant_option_borrow_field_class(
133 bt_field_class_variant_option *option);
8f16d5b7 134
c82deff2
PP
135#ifdef __cplusplus
136}
137#endif
138
139#endif /* BABELTRACE_TRACE_IR_FIELD_CLASSES_H */
This page took 0.032678 seconds and 5 git commands to generate.