lib: update and simplify the `bt_object` API
[babeltrace.git] / include / babeltrace / ctf-ir / event-class-internal.h
index a89e82dd1c3178920fa75b786188ff7eb58b6115..40df300c911b8ea25b070d463e2a2691f69b6bf6 100644 (file)
@@ -38,6 +38,7 @@
 #include <babeltrace/ctf-ir/event-class.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/assert-internal.h>
+#include <babeltrace/object-pool-internal.h>
 #include <glib.h>
 
 struct bt_event_class_common {
@@ -63,6 +64,9 @@ struct bt_event_class_common {
 
 struct bt_event_class {
        struct bt_event_class_common common;
+
+       /* Pool of `struct bt_event *` */
+       struct bt_object_pool event_pool;
 };
 
 BT_HIDDEN
@@ -80,7 +84,7 @@ struct bt_stream_class_common *bt_event_class_common_borrow_stream_class(
                struct bt_event_class_common *event_class)
 {
        BT_ASSERT(event_class);
-       return (void *) bt_object_borrow_parent(event_class);
+       return (void *) bt_object_borrow_parent(&event_class->base);
 }
 
 typedef struct bt_field_type_common *(*bt_field_type_structure_create_func)();
@@ -98,6 +102,10 @@ int bt_event_class_common_validate_single_clock_class(
                struct bt_event_class_common *event_class,
                struct bt_clock_class **expected_clock_class);
 
+BT_HIDDEN
+int bt_event_class_update_event_pool_clock_values(
+               struct bt_event_class *event_class);
+
 static inline
 const char *bt_event_class_common_get_name(
                struct bt_event_class_common *event_class)
This page took 0.024696 seconds and 4 git commands to generate.