2022-06-06 11:23:33 +03:00
|
|
|
/* This software is licensed by the MIT License, see LICENSE file */
|
|
|
|
/* Copyright © 2022 Gregory Lirent */
|
|
|
|
|
|
|
|
#include "__generics.h"
|
|
|
|
#include "vtype.h"
|
|
|
|
|
|
|
|
#ifndef LIBCDSB_SET_H
|
|
|
|
#define LIBCDSB_SET_H
|
|
|
|
|
|
|
|
extern void vset_init(vtype_set* x, vtype type);
|
|
|
|
|
2022-06-06 23:47:26 +03:00
|
|
|
#define vset_remove(x, value) _LIBCDSB_Generic (libcdsb_vset, touch, value)(x, value, 1)
|
|
|
|
#define vset_push(x, value) _LIBCDSB_Generic (libcdsb_vset, push, value)(x, value)
|
2022-06-06 11:23:33 +03:00
|
|
|
|
2022-06-06 23:47:26 +03:00
|
|
|
#define in_vset(x, value) _LIBCDSB_Generic (libcdsb_vset, touch, value)(x, value, 0)
|
2022-06-06 11:23:33 +03:00
|
|
|
|
|
|
|
extern _Bool libcdsb_vset_push_pointer(vtype_set* x, const void* value);
|
|
|
|
extern _Bool libcdsb_vset_push_cstring(vtype_set* x, const char* value);
|
|
|
|
extern _Bool libcdsb_vset_push_string (vtype_set* x, const vtype_string* value);
|
|
|
|
extern _Bool libcdsb_vset_push_array (vtype_set* x, const vtype_array* value);
|
|
|
|
extern _Bool libcdsb_vset_push_list (vtype_set* x, const vtype_list* value);
|
|
|
|
extern _Bool libcdsb_vset_push_map (vtype_set* x, const vtype_map* value);
|
|
|
|
extern _Bool libcdsb_vset_push_vset (vtype_set* x, const vtype_set* value);
|
|
|
|
extern _Bool libcdsb_vset_push_boolean(vtype_set* x, vtype_bool value);
|
|
|
|
extern _Bool libcdsb_vset_push_uint8 (vtype_set* x, vtype_uint8 value);
|
|
|
|
extern _Bool libcdsb_vset_push_uint16 (vtype_set* x, vtype_uint16 value);
|
|
|
|
extern _Bool libcdsb_vset_push_uint32 (vtype_set* x, vtype_uint32 value);
|
|
|
|
extern _Bool libcdsb_vset_push_uint64 (vtype_set* x, vtype_uint64 value);
|
|
|
|
extern _Bool libcdsb_vset_push_int8 (vtype_set* x, vtype_int8 value);
|
|
|
|
extern _Bool libcdsb_vset_push_int16 (vtype_set* x, vtype_int16 value);
|
|
|
|
extern _Bool libcdsb_vset_push_int32 (vtype_set* x, vtype_int32 value);
|
|
|
|
extern _Bool libcdsb_vset_push_int64 (vtype_set* x, vtype_int64 value);
|
|
|
|
extern _Bool libcdsb_vset_push_float (vtype_set* x, vtype_float value);
|
|
|
|
extern _Bool libcdsb_vset_push_double (vtype_set* x, vtype_double value);
|
|
|
|
extern _Bool libcdsb_vset_push_ldouble(vtype_set* x, vtype_ldouble value);
|
|
|
|
|
|
|
|
extern _Bool libcdsb_vset_touch_pointer(vtype_set* x, const void* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_cstring(vtype_set* x, const char* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_string (vtype_set* x, const vtype_string* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_array (vtype_set* x, const vtype_array* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_list (vtype_set* x, const vtype_list* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_map (vtype_set* x, const vtype_map* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_vset (vtype_set* x, const vtype_set* value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_boolean(vtype_set* x, vtype_bool value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_uint8 (vtype_set* x, vtype_uint8 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_uint16 (vtype_set* x, vtype_uint16 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_uint32 (vtype_set* x, vtype_uint32 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_uint64 (vtype_set* x, vtype_uint64 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_int8 (vtype_set* x, vtype_int8 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_int16 (vtype_set* x, vtype_int16 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_int32 (vtype_set* x, vtype_int32 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_int64 (vtype_set* x, vtype_int64 value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_float (vtype_set* x, vtype_float value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_double (vtype_set* x, vtype_double value, _Bool cut);
|
|
|
|
extern _Bool libcdsb_vset_touch_ldouble(vtype_set* x, vtype_ldouble value, _Bool cut);
|
|
|
|
|
|
|
|
#endif /* LIBCDSB_SET_H */
|