Debian Codegraph @

build/future_function_templates/future-value.h.template

raw
1 #ifndef FUTURE_VALUE_H
2 #define FUTURE_VALUE_H
3
4 #include <mongoc/mongoc.h>
5
6
7 #include <mongoc/mongoc-cluster-private.h>
8 #include <mongoc/mongoc-topology-private.h>
9
10
11 {{ header_comment }}
12
13 {% for T in typedef_list %}{% if T.typedef %}
14 typedef {{ T.typedef }} {{ T.name }};{% endif %}{% endfor %}
15
16 typedef enum {
17 future_value_no_type = 0,
18 {% for T in type_list_with_void %} future_value_{{ T }}_type,
19 {% endfor %}
20 } future_value_type_t;
21
22 typedef struct _future_value_t
23 {
24 future_value_type_t type;
25 union {
26 {% for T in type_list %} {{ T }} {{ T }}_value;
27 {% endfor %}
28 } value;
29 } future_value_t;
30
31 future_value_t *future_value_new (void);
32
33 #ifdef __clang__
34 #pragma clang diagnostic push
35 #pragma clang diagnostic ignored "-Wunused-function"
36 #endif
37
38 void future_value_set_void (future_value_t *future_value);
39
40 void future_value_get_void (future_value_t *future_value);
41
42 {% for T in type_list %}
43 void
44 future_value_set_{{ T }}(
45 future_value_t *future_value,
46 {{ T }} value);
47
48 {{ T }}
49 future_value_get_{{ T }} (
50 future_value_t *future_value);
51 {% endfor %}
52
53 #ifdef __clang__
54 #pragma clang diagnostic pop
55 #endif
56
57 #endif /* FUTURE_VALUE_H */