Add float type class to babeltrace types
[babeltrace.git] / include / babeltrace / types.h
index f8c3c8aa1de80d2a362392c9aa964387432b9ecf..b77ac4002017dbb3a7ed0c50fa00b374fbfe23f2 100644 (file)
@@ -54,6 +54,7 @@ struct type_class_float {
        size_t mantissa_len;
        size_t exp_len;
        int byte_order;
+       /* TODO: we might want to express more info about NaN, +inf and -inf */
 };
 
 struct type_class_enum {
@@ -66,4 +67,27 @@ struct type_class_struct {
        /* TODO */
 };
 
+struct type_class *ctf_lookup_type(GQuark qname);
+int ctf_register_type(struct type_class *type_class);
+
+/* Nameless types can be created by passing a NULL name */
+
+struct type_class_integer *integer_type_new(const char *name,
+                                           size_t start_offset,
+                                           size_t len, int byte_order,
+                                           int signedness);
+void integer_type_free(struct type_class_integer *int_class);
+
+struct type_class_bitfield *bitfield_type_new(const char *name,
+                                             size_t start_offset,
+                                             size_t len, int byte_order,
+                                             int signedness);
+void bitfield_type_free(struct type_class_bitfield *bitfield_class);
+
+struct type_class_float *float_type_new(const char *name,
+                                       size_t mantissa_len,
+                                       size_t exp_len, int byte_order,
+                                       size_t alignment);
+void float_type_free(struct type_class_float *float_class);
+
 #endif /* _BABELTRACE_TYPES_H */
This page took 0.02348 seconds and 4 git commands to generate.