c5d77517 |
1 | #ifndef LTTV_H |
2 | #define LTTV_H |
3 | |
4 | |
5 | #include <lttv/attribute.h> |
6 | #include <lttv/hook.h> |
7 | #include <lttv/option.h> |
8 | #include <lttv/module.h> |
9 | /* Initial draft by Michel Dagenais May 2003 |
10 | * Reworked by Mathieu Desnoyers, May 2003 |
11 | */ |
12 | |
13 | /* The modules in the visualizer communicate with the main module and |
14 | with each other through attributes. There is a global set of attributes as |
15 | well as attributes attached to each trace set, trace and tracefile. */ |
16 | |
17 | lttv_attributes *lttv_global_attributes(); |
18 | |
19 | |
20 | /* Modules are allowed to define new command line options. |
21 | |
22 | Each option has a long name (--long_name), a short one character |
23 | name (-c), a descriptive text, the argument type, and a |
24 | pointer to where the argument value will be stored. For an option of |
25 | type LTTV_OPT_NONE, the argument is a boolean value set to true when the |
26 | option is present. */ |
27 | |
28 | /* Those are already in option.h, cause conflict */ |
29 | //typedef enum _lttv_option_type |
30 | //{LTTV_OPT_NONE, LTTV_OPT_STRING, LTTV_OPT_INT, LTTV_OPT_LONG } |
31 | //lttv_option_type; |
32 | |
33 | |
34 | //void lttv_option_add(char *long_name, char char_name, char *description, |
35 | // lttv_option_type t, void *p); |
36 | |
37 | |
38 | |
39 | /* A number of global attributes are initialized before modules are |
40 | loaded, for example hooks lists. More global attributes are defined |
41 | in individual mudules to store information or to communicate with other |
42 | modules (GUI windows, menus...). |
43 | |
44 | The hooks lists (lttv_hooks) are initialized in the main module and may be |
45 | used by other modules. Each corresponds to a specific location in the main |
46 | module processing loop. The attribute key and typical usage for each |
47 | is indicated. |
48 | |
49 | /hooks/options/before |
50 | Good place to define new command line options to be parsed. |
51 | |
52 | /hooks/options/after |
53 | Read the values set by the command line options. |
54 | |
55 | /hooks/trace_set/before |
56 | Before any analysis. |
57 | |
58 | /hooks/trace_set/after |
59 | After all traces were analyzed. |
60 | |
61 | /hooks/trace/before |
62 | Before each trace. |
63 | |
64 | /hooks/trace/after |
65 | After each trace. |
66 | |
67 | /hooks/tracefile/before |
68 | Before each tracefile. |
69 | |
70 | /hooks/tracefile/after |
71 | After each tracefile. |
72 | |
73 | /hooks/event |
74 | Called for each event |
75 | |
76 | /hooks/event_id |
77 | This attribute contains an lttv_hooks_by_id, where the hooks for each |
78 | id are to be called when an event of the associated type are found. |
79 | |
80 | */ |
81 | |
82 | #endif // LTTV_H |