![]() |
#include <aerospike/as_util.h>
#include <aerospike/as_val.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | as_boolean |
Functions | |
static void | as_boolean_destroy (as_boolean *boolean) |
static as_boolean * | as_boolean_fromval (const as_val *v) |
static bool | as_boolean_get (const as_boolean *boolean) |
static bool | as_boolean_getorelse (const as_boolean *boolean, bool fallback) |
as_boolean * | as_boolean_init (as_boolean *boolean, bool value) |
as_boolean * | as_boolean_new (bool value) |
static bool | as_boolean_tobool (const as_boolean *boolean) |
static as_val * | as_boolean_toval (const as_boolean *boolean) |
void | as_boolean_val_destroy (as_val *v) |
uint32_t | as_boolean_val_hashcode (const as_val *v) |
char * | as_boolean_val_tostring (const as_val *v) |
Variables | |
const as_boolean | as_false |
const as_boolean | as_true |
|
inlinestatic |
Destroy the as_boolean
and release associated resources.
boolean | The as_boolean to destroy. |
Definition at line 118 of file modules/common/src/include/aerospike/as_boolean.h.
References as_val_destroy.
|
inlinestatic |
Convert from an as_val.
Definition at line 172 of file modules/common/src/include/aerospike/as_boolean.h.
References AS_BOOLEAN, and as_util_fromval.
|
inlinestatic |
Get the bool value.
Definition at line 140 of file modules/common/src/include/aerospike/as_boolean.h.
References as_boolean::as_boolean_getorelse().
|
inlinestatic |
Get the bool value. If boolean is NULL, then return the fallback value.
Definition at line 131 of file modules/common/src/include/aerospike/as_boolean.h.
as_boolean * as_boolean_init | ( | as_boolean * | boolean, |
bool | value | ||
) |
Initialize a stack allocated as_boolean
with the given boolean value.
boolean | The as_boolean to initialize. |
value | The bool value. |
as_boolean * as_boolean_new | ( | bool | value | ) |
Creates a new heap allocated as_boolean
and initializes with the given boolean value.
value | The bool value. |
|
inlinestatic |
Get the bool value.
Definition at line 150 of file modules/common/src/include/aerospike/as_boolean.h.
References as_boolean::as_boolean_getorelse().
|
inlinestatic |
Convert to an as_val.
Definition at line 163 of file modules/common/src/include/aerospike/as_boolean.h.
|
private |
Internal helper function for destroying an as_val.
|
private |
Internal helper function for getting the hashcode of an as_val.
|
private |
Internal helper function for getting the string representation of an as_val.
const as_boolean as_false |
False value.
Use this when you need to use an as_boolean
containing true
, rather than allocating a new as_boolean
.
const as_boolean as_true |
True value.
Use this when you need to use an as_boolean
containing true
, rather than allocating a new as_boolean
.