.gitignore: add some more IDE / tools related file
[babeltrace.git] / src / lib / trace-ir / event-class.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 */
7
8 #ifndef BABELTRACE_LIB_TRACE_IR_EVENT_CLASS_H
9 #define BABELTRACE_LIB_TRACE_IR_EVENT_CLASS_H
10
11 #include <babeltrace2/trace-ir/field-class.h>
12 #include <babeltrace2/trace-ir/field.h>
13 #include <babeltrace2/value.h>
14 #include <babeltrace2/trace-ir/stream-class.h>
15 #include <babeltrace2/trace-ir/stream.h>
16 #include <babeltrace2/trace-ir/event-class.h>
17 #include "lib/object.h"
18 #include "common/assert.h"
19 #include "lib/object-pool.h"
20 #include "lib/property.h"
21 #include <glib.h>
22 #include <stdbool.h>
23
24 struct bt_event_class {
25 struct bt_object base;
26 struct bt_field_class *specific_context_fc;
27 struct bt_field_class *payload_fc;
28
29 /* Owned by this */
30 struct bt_value *user_attributes;
31
32 gchar *name;
33
34 uint64_t id;
35 struct bt_property_uint log_level;
36
37 gchar *emf_uri;
38
39 /* Pool of `struct bt_event *` */
40 struct bt_object_pool event_pool;
41
42 bool frozen;
43 };
44
45 void _bt_event_class_freeze(const struct bt_event_class *event_class);
46
47 #ifdef BT_DEV_MODE
48 # define bt_event_class_freeze _bt_event_class_freeze
49 #else
50 # define bt_event_class_freeze(_ec)
51 #endif
52
53 static inline
54 struct bt_stream_class *bt_event_class_borrow_stream_class_inline(
55 const struct bt_event_class *event_class)
56 {
57 BT_ASSERT_DBG(event_class);
58 return (void *) bt_object_borrow_parent(&event_class->base);
59 }
60
61 #endif /* BABELTRACE_LIB_TRACE_IR_EVENT_CLASS_H */
This page took 0.031545 seconds and 5 git commands to generate.