#ifndef FUTURE_VALUE_H
#define FUTURE_VALUE_H

#include <mongoc/mongoc.h>


#include "mongoc/mongoc-cluster-private.h"
#include "mongoc/mongoc-topology-private.h"


{{ header_comment }}

{% for T in typedef_list %}{% if T.typedef %}
typedef {{ T.typedef }} {{ T.name }};{% endif %}{% endfor %}

typedef enum {
   future_value_no_type = 0,
{% for T in type_list_with_void %}   future_value_{{ T }}_type,
{% endfor %}
} future_value_type_t;

typedef struct _future_value_t
{
   future_value_type_t type;
   union {
{% for T in type_list %}      {{ T }} {{ T }}_value;
{% endfor %}
   } value;
} future_value_t;

future_value_t *future_value_new (void);

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function"
#endif

void future_value_set_void (future_value_t *future_value);

void future_value_get_void (future_value_t *future_value);

{% for T in type_list %}
void
future_value_set_{{ T }}(
   future_value_t *future_value,
   {{ T }} value);

{{ T }}
future_value_get_{{ T }} (
   future_value_t *future_value);
{% endfor %}

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#endif /* FUTURE_VALUE_H */
