All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Fields | Private Attributes | Related Functions
as_boolean Struct Reference

Detailed Description

Boolean value.

To use the boolean value, you should use one of the two constants:

as_boolean as_true;
as_boolean as_false;

Both as_boolean_init() and as_boolean_new() should be used sparingly.

Definition at line 47 of file modules/common/src/include/aerospike/as_boolean.h.

#include "as_boolean.h"

+ Inheritance diagram for as_boolean:
+ Collaboration diagram for as_boolean:

Data Fields

bool value
 
- Data Fields inherited from as_val
cf_atomic32 count
 
bool free
 
enum as_val_t type
 

Private Attributes

as_val _
 

Related Functions

(Note that these are not member functions.)

static void as_boolean_destroy (as_boolean *boolean)
 
static as_booleanas_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_booleanas_boolean_init (as_boolean *boolean, bool value)
 
as_booleanas_boolean_new (bool value)
 
static bool as_boolean_tobool (const as_boolean *boolean)
 
static as_valas_boolean_toval (const as_boolean *boolean)
 

Friends And Related Function Documentation

static void as_boolean_destroy ( as_boolean boolean)
related

Destroy the as_boolean and release associated resources.

Parameters
booleanThe as_boolean to destroy.

Definition at line 118 of file modules/common/src/include/aerospike/as_boolean.h.

static as_boolean * as_boolean_fromval ( const as_val v)
related

Convert from an as_val.

Definition at line 172 of file modules/common/src/include/aerospike/as_boolean.h.

static bool as_boolean_get ( const as_boolean boolean)
related

Get the bool value.

Definition at line 140 of file modules/common/src/include/aerospike/as_boolean.h.

static bool as_boolean_getorelse ( const as_boolean boolean,
bool  fallback 
)
related

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 
)
related

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)
related

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.
static bool as_boolean_tobool ( const as_boolean boolean)
related

Get the bool value.

Get the bool value.

Get the bool value.

Definition at line 150 of file modules/common/src/include/aerospike/as_boolean.h.

static as_val * as_boolean_toval ( const as_boolean boolean)
related

Convert to an as_val.

Definition at line 163 of file modules/common/src/include/aerospike/as_boolean.h.

Field Documentation

as_val as_boolean::_
private

as_boolean is a subtype of as_val. You can cast as_boolean to as_val.

Definition at line 54 of file modules/common/src/include/aerospike/as_boolean.h.

bool as_boolean::value

The boolean value.

Definition at line 59 of file modules/common/src/include/aerospike/as_boolean.h.


The documentation for this struct was generated from the following file: