Rename bt_ctf_X -> bt_X, maintain backward compat. for pre-2.0 CTF writer
[babeltrace.git] / doc / api / dox / examples-ctfir.dox
index 1dc632f7d74ac1afa01235c8f86a06e44cdba86a..1c411addce50685a315e9ca474d03f1a65f3ad39 100644 (file)
@@ -25,11 +25,11 @@ This page contains usage examples of the \ref ctfirfieldtypes API.
 #include <assert.h>
 #include <babeltrace/ctf-ir/field-types.h>
 
-struct bt_ctf_field_type *create_int_field_type(void)
+struct bt_field_type *create_int_field_type(void)
 {
-    struct bt_ctf_field_type *field_type;
+    struct bt_field_type *field_type;
 
-    field_type = bt_ctf_field_type_integer_create(16);
+    field_type = bt_field_type_integer_create(16);
     assert(field_type);
 
     return field_type;
@@ -42,19 +42,19 @@ struct bt_ctf_field_type *create_int_field_type(void)
 #include <assert.h>
 #include <babeltrace/ctf-ir/field-types.h>
 
-struct bt_ctf_field_type *create_int_field_type(void)
+struct bt_field_type *create_int_field_type(void)
 {
     int ret;
-    struct bt_ctf_field_type *field_type;
+    struct bt_field_type *field_type;
 
-    field_type = bt_ctf_field_type_integer_create(23);
+    field_type = bt_field_type_integer_create(23);
     assert(field_type);
 
-    ret = bt_ctf_field_type_set_byte_order(field_type,
-                                           BT_CTF_BYTE_ORDER_BIG_ENDIAN);
+    ret = bt_field_type_set_byte_order(field_type,
+                                           BT_BYTE_ORDER_BIG_ENDIAN);
     assert(ret == 0);
 
-    ret = bt_ctf_field_type_integer_set_signed(field_type, 1);
+    ret = bt_field_type_integer_set_signed(field_type, 1);
     assert(ret == 0);
 
     return field_type;
@@ -67,20 +67,20 @@ struct bt_ctf_field_type *create_int_field_type(void)
 #include <assert.h>
 #include <babeltrace/ctf-ir/field-types.h>
 
-struct bt_ctf_field_type *create_int_field_type(
-        struct bt_ctf_clock_class *clock_class)
+struct bt_field_type *create_int_field_type(
+        struct bt_clock_class *clock_class)
 {
     int ret;
-    struct bt_ctf_field_type *field_type;
+    struct bt_field_type *field_type;
 
-    field_type = bt_ctf_field_type_integer_create(8);
+    field_type = bt_field_type_integer_create(8);
     assert(field_type);
 
-    ret = bt_ctf_field_type_integer_set_base(field_type,
-                                             BT_CTF_INTEGER_BASE_HEXADECIMAL);
+    ret = bt_field_type_integer_set_base(field_type,
+                                             BT_INTEGER_BASE_HEXADECIMAL);
     assert(ret == 0);
 
-    ret = bt_ctf_field_type_integer_set_mapped_clock(field_type, clock_class);
+    ret = bt_field_type_integer_set_mapped_clock(field_type, clock_class);
     assert(ret == 0);
 
     return field_type;
@@ -98,11 +98,11 @@ struct bt_ctf_field_type *create_int_field_type(
 #include <assert.h>
 #include <babeltrace/ctf-ir/field-types.h>
 
-struct bt_ctf_field_type *create_float_field_type(void)
+struct bt_field_type *create_float_field_type(void)
 {
-    struct bt_ctf_field_type *field_type;
+    struct bt_field_type *field_type;
 
-    field_type = bt_ctf_field_type_floating_point_create();
+    field_type = bt_field_type_floating_point_create();
     assert(field_type);
 
     return field_type;
@@ -115,22 +115,22 @@ struct bt_ctf_field_type *create_float_field_type(void)
 #include <assert.h>
 #include <babeltrace/ctf-ir/field-types.h>
 
-struct bt_ctf_field_type *create_float_field_type(void)
+struct bt_field_type *create_float_field_type(void)
 {
     int ret;
-    struct bt_ctf_field_type *field_type;
+    struct bt_field_type *field_type;
 
-    field_type = bt_ctf_field_type_floating_point_create();
+    field_type = bt_field_type_floating_point_create();
     assert(field_type);
 
-    ret = bt_ctf_field_type_set_byte_order(field_type,
-                                           BT_CTF_BYTE_ORDER_LITTLE_ENDIAN);
+    ret = bt_field_type_set_byte_order(field_type,
+                                           BT_BYTE_ORDER_LITTLE_ENDIAN);
     assert(ret == 0);
 
-    ret = bt_ctf_field_type_floating_point_set_exponent_digits(field_type, 11);
+    ret = bt_field_type_floating_point_set_exponent_digits(field_type, 11);
     assert(ret == 0);
 
-    ret = bt_ctf_field_type_floating_point_set_mantissa_digits(field_type, 53);
+    ret = bt_field_type_floating_point_set_mantissa_digits(field_type, 53);
     assert(ret == 0);
 
     return field_type;
This page took 0.026535 seconds and 4 git commands to generate.