move plugin to modules
[lttv.git] / ltt / branches / poly / include / ltt / type.h
index a65a3200313552a792497b203b506a7f21884f75..de1fd03ccb576df9e38286530a91da8b2db2afb0 100644 (file)
@@ -1,16 +1,37 @@
+#ifndef TYPE_H
+#define TYPE_H
 
 #include <ltt/ltt.h>
 
 
 #include <ltt/ltt.h>
 
-/* All event types and data types belong to their facilities and 
-   are released at the same time. All fields belong to their tracefile and
+
+/* Different types allowed */
+
+typedef enum _ltt_type_enum 
+{ LTT_INT, LTT_UINT, LTT_FLOAT, LTT_STRING, LTT_ENUM, LTT_ARRAY, 
+  LTT_SEQUENCE, LTT_STRUCT
+} ltt_type_enum;
+
+
+/* All event types, data types and fields belong to their trace and 
    are released at the same time. */
 
    are released at the same time. */
 
+/* Obtain the name, description, facility, facility relative id, global id, 
+   type and root field for an eventtype */
+
 char *ltt_eventtype_name(ltt_eventtype *et);
 
 char *ltt_eventtype_description(ltt_eventtype *et);
 
 char *ltt_eventtype_name(ltt_eventtype *et);
 
 char *ltt_eventtype_description(ltt_eventtype *et);
 
+ltt_facility *ltt_eventtype_facility(ltt_eventtype *et);
+
+unsigned *ltt_eventtype_relative_id(ltt_eventtype *et);
+
+unsigned *ltt_eventtype_id(ltt_eventtype *et);
+
 ltt_type *ltt_eventtype_type(ltt_eventtype *et);
 
 ltt_type *ltt_eventtype_type(ltt_eventtype *et);
 
+ltt_field *ltt_eventtype_field(ltt_eventtype *et);
+
 
 /* obtain the type name and size. The size is the number of bytes for
    primitive types (INT, UINT, FLOAT, ENUM), or the size for the unsigned
 
 /* obtain the type name and size. The size is the number of bytes for
    primitive types (INT, UINT, FLOAT, ENUM), or the size for the unsigned
@@ -18,9 +39,9 @@ ltt_type *ltt_eventtype_type(ltt_eventtype *et);
  
 char *ltt_type_name(ltt_type *t);
 
  
 char *ltt_type_name(ltt_type *t);
 
-ltt_type_enum *ltt_type_class(ltt_type *t);
+ltt_type_enum ltt_type_class(ltt_type *t);
 
 
-unsigned ltt_type_size(ltt_type *t);
+unsigned ltt_type_size(ltt_tracefile * tf, ltt_type *t); 
 
 
 /* The type of nested elements for arrays and sequences. */
 
 
 /* The type of nested elements for arrays and sequences. */
@@ -54,7 +75,7 @@ char *ltt_enum_string_get(ltt_type *t, unsigned i);
    sequences simply point to one nested field representing the currently
    selected element among all the (identically typed) elements. For structures,
    a nested field exists for each data member. Each field stores the
    sequences simply point to one nested field representing the currently
    selected element among all the (identically typed) elements. For structures,
    a nested field exists for each data member. Each field stores the
-   platform/tracefile specific offset values (for efficient access) and
+   platform/trace specific offset values (for efficient access) and
    points back to the corresponding ltt_type for the rest. */
 
 ltt_field *ltt_field_element(ltt_field *f);
    points back to the corresponding ltt_type for the rest. */
 
 ltt_field *ltt_field_element(ltt_field *f);
@@ -63,3 +84,4 @@ ltt_field *ltt_field_member(ltt_field *f, unsigned i);
 
 ltt_type *ltt_field_type(ltt_field *f);
 
 
 ltt_type *ltt_field_type(ltt_field *f);
 
+#endif // TYPE_H
This page took 0.023256 seconds and 4 git commands to generate.