Fix API : functions to access fields properties
[babeltrace.git] / types / integer.c
index 6e1243059b51ce533d598d1b8ed5652598c22571..808a4893680d3dc302a62d93f9b400299da9cffd 100644 (file)
@@ -107,6 +107,50 @@ void _integer_definition_free(struct definition *definition)
        g_free(integer);
 }
 
+enum ctf_string_encoding get_int_encoding(const struct definition *field)
+{
+       struct definition_integer *integer_definition;
+       const struct declaration_integer *integer_declaration;
+
+       integer_definition = container_of(field, struct definition_integer, p);
+       integer_declaration = integer_definition->declaration;
+
+       return integer_declaration->encoding;
+}
+
+int get_int_base(const struct definition *field)
+{
+       struct definition_integer *integer_definition;
+       const struct declaration_integer *integer_declaration;
+
+       integer_definition = container_of(field, struct definition_integer, p);
+       integer_declaration = integer_definition->declaration;
+
+       return integer_declaration->base;
+}
+
+int get_int_byte_order(const struct definition *field)
+{
+       struct definition_integer *integer_definition;
+       const struct declaration_integer *integer_declaration;
+
+       integer_definition = container_of(field, struct definition_integer, p);
+       integer_declaration = integer_definition->declaration;
+
+       return integer_declaration->byte_order;
+}
+
+int get_int_signedness(const struct definition *field)
+{
+       struct definition_integer *integer_definition;
+       const struct declaration_integer *integer_declaration;
+
+       integer_definition = container_of(field, struct definition_integer, p);
+       integer_declaration = integer_definition->declaration;
+
+       return integer_declaration->signedness;
+}
+
 uint64_t get_unsigned_int(const struct definition *field)
 {
        struct definition_integer *integer_definition;
This page took 0.031256 seconds and 4 git commands to generate.