All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions | Variables
modules/common/target/Linux-x86_64/include/aerospike/as_boolean.h File Reference
#include <aerospike/as_util.h>
#include <aerospike/as_val.h>
#include <stdbool.h>
+ Include dependency graph for modules/common/target/Linux-x86_64/include/aerospike/as_boolean.h:

Go to the source code of this file.

Data Structures

struct  as_boolean
 

Functions

void as_boolean_destroy (as_boolean *boolean)
 
as_booleanas_boolean_fromval (const as_val *v)
 
bool as_boolean_get (const as_boolean *boolean)
 
bool as_boolean_getorelse (const as_boolean *boolean, bool fallback)
 
as_booleanas_boolean_init (as_boolean *boolean, bool value)
 
as_booleanas_boolean_new (bool value)
 
bool as_boolean_tobool (const as_boolean *boolean)
 
as_valas_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
 

Function Documentation

void as_boolean_destroy ( as_boolean boolean)
inline

Destroy the as_boolean and release associated resources.

Parameters
booleanThe as_boolean to destroy.

Definition at line 118 of file modules/common/target/Linux-x86_64/include/aerospike/as_boolean.h.

References as_val_destroy.

as_boolean* as_boolean_fromval ( const as_val v)
inline

Convert from an as_val.

Definition at line 172 of file modules/common/target/Linux-x86_64/include/aerospike/as_boolean.h.

References AS_BOOLEAN, and as_util_fromval.

bool as_boolean_get ( const as_boolean boolean)
inline
bool as_boolean_getorelse ( const as_boolean boolean,
bool  fallback 
)
inline

Get the bool value. If boolean is NULL, then return the fallback value.

Definition at line 131 of file modules/common/target/Linux-x86_64/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.

Parameters
booleanThe as_boolean to initialize.
valueThe bool value.
Returns
On success, the initialized value. Otherwise NULL.
as_boolean* as_boolean_new ( bool  value)

Creates a new heap allocated as_boolean and initializes with the given boolean value.

Parameters
valueThe bool value.
Returns
On success, the newly allocated value. Otherwise NULL.
bool as_boolean_tobool ( const as_boolean boolean)
inline
as_val* as_boolean_toval ( const as_boolean boolean)
inline
void as_boolean_val_destroy ( as_val v)
private

Internal helper function for destroying an as_val.

uint32_t as_boolean_val_hashcode ( const as_val v)
private

Internal helper function for getting the hashcode of an as_val.

char* as_boolean_val_tostring ( const as_val v)
private

Internal helper function for getting the string representation of an as_val.

Variable Documentation

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.