Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix make dist
[simgrid.git] / include / dd_type_bag.h
1 /* gs_type_bag.h */
2 #ifndef GS_TYPE_BAG_H
3 #define GS_TYPE_BAG_H
4
5 /* used structs */
6 struct s_gs_type_bag;
7 struct s_gs_type_driver;
8
9 struct s_gs_type_bag_ops {
10
11         void
12         (*_init)                        (struct s_gs_type_bag   *p_type_bag);
13
14         void
15         (*_exit)                        (struct s_gs_type_bag   *p_type_bag);
16
17
18         void
19         (*register_incoming_connection) (struct s_gs_type_bag   *p_type_bag,
20                                          struct s_gs_connection *p_connection);
21
22         void
23         (*register_outgoing_connection) (struct s_gs_type_bag   *p_type_bag,
24                                          struct s_gs_connection *p_connection);
25
26
27         void
28         (*store_type)                   (struct s_gs_type_bag   *p_type_bag,
29                                          struct s_gs_connection *p_connection,
30                                          struct s_gs_type       *p_type);
31
32         void
33         (*store_incoming_type)          (struct s_gs_type_bag   *p_type_bag,
34                                          struct s_gs_connection *p_connection,
35                                          struct s_gs_type       *p_type);
36
37         struct s_gs_type *
38         (*get_type_by_name)             (struct s_gs_type_bag   *p_type_bag,
39                                          struct s_gs_connection *p_connection,
40                                          const char             *name);
41
42         struct s_gs_type *
43         (*get_type_by_code)             (struct s_gs_type_bag   *p_type_bag,
44                                          struct s_gs_connection *p_connection,
45                                          int                     code);
46
47         void
48         (*mark_type)                    (struct s_gs_type_bag   *p_type_bag,
49                                          struct s_gs_connection *p_connection,
50                                          const char             *name);
51
52         int
53         (*check_type_mark)              (struct s_gs_type_bag   *p_type_bag,
54                                          struct s_gs_connection *p_connection,
55                                          const char             *name);
56
57
58         void
59         (*store_message)                (struct s_gs_type_bag   *p_type_bag,
60                                          struct s_gs_connection *p_connection,
61                                          struct s_gs_message    *p_message);
62
63         void
64         (*store_incoming_message)       (struct s_gs_type_bag   *p_type_bag,
65                                          struct s_gs_connection *p_connection,
66                                          struct s_gs_message    *p_message);
67
68         struct s_gs_message *
69         (*get_message_by_name)          (struct s_gs_type_bag   *p_type_bag,
70                                          struct s_gs_connection *p_connection,
71                                          const char             *name);
72
73         struct s_gs_message *
74         (*get_message_by_code)          (struct s_gs_type_bag   *p_type_bag,
75                                          struct s_gs_connection *p_connection,
76                                          int                     code);
77
78         void
79         (*mark_message)                 (struct s_gs_type_bag   *p_type_bag,
80                                          struct s_gs_connection *p_connection,
81                                          const char             *name);
82
83         int
84         (*check_message_mark)           (struct s_gs_type_bag   *p_type_bag,
85                                          struct s_gs_connection *p_connection,
86                                          const char             *name);
87
88 };
89
90 struct s_gs_type_bag {
91         struct s_gs_type_bag_ops        *bag_ops;
92         struct s_gs_type_driver         *p_type_driver;
93         void                            *specific;
94 };
95
96
97 #endif /* GS_TYPE_BAG_H */