.gitignore: add some more IDE / tools related file
[babeltrace.git] / src / lib / trace-ir / event-class.h
... / ...
CommitLineData
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_TRACE_IR_EVENT_CLASS_INTERNAL_H
9#define BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_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
24struct 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 struct {
33 GString *str;
34
35 /* NULL or `str->str` above */
36 const char *value;
37 } name;
38
39 uint64_t id;
40 struct bt_property_uint log_level;
41
42 struct {
43 GString *str;
44
45 /* NULL or `str->str` above */
46 const char *value;
47 } emf_uri;
48
49 /* Pool of `struct bt_event *` */
50 struct bt_object_pool event_pool;
51
52 bool frozen;
53};
54
55void _bt_event_class_freeze(const struct bt_event_class *event_class);
56
57#ifdef BT_DEV_MODE
58# define bt_event_class_freeze _bt_event_class_freeze
59#else
60# define bt_event_class_freeze(_ec)
61#endif
62
63static inline
64struct bt_stream_class *bt_event_class_borrow_stream_class_inline(
65 const struct bt_event_class *event_class)
66{
67 BT_ASSERT_DBG(event_class);
68 return (void *) bt_object_borrow_parent(&event_class->base);
69}
70
71#endif /* BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H */
This page took 0.024698 seconds and 4 git commands to generate.