![]() |
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 as_boolean.h.
#include "as_boolean.h"
Data Fields | |
bool | value |
![]() | |
cf_atomic32 | count |
bool | free |
enum as_val_t | type |
Private Attributes | |
as_val | _ |
Related Functions | |
(Note that these are not member functions.) | |
void | as_boolean_destroy (as_boolean *boolean) |
as_boolean * | as_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_boolean * | as_boolean_init (as_boolean *boolean, bool value) |
as_boolean * | as_boolean_new (bool value) |
bool | as_boolean_tobool (const as_boolean *boolean) |
as_val * | as_boolean_toval (const as_boolean *boolean) |
|
related |
Destroy the as_boolean
and release associated resources.
boolean | The as_boolean to destroy. |
Definition at line 118 of file as_boolean.h.
|
related |
Convert from an as_val.
Definition at line 172 of file as_boolean.h.
|
related |
Get the bool value.
Definition at line 140 of file as_boolean.h.
|
related |
Get the bool value. If boolean is NULL, then return the fallback value.
Definition at line 131 of file as_boolean.h.
|
related |
Initialize a stack allocated as_boolean
with the given boolean value.
boolean | The as_boolean to initialize. |
value | The bool value. |
|
related |
Creates a new heap allocated as_boolean
and initializes with the given boolean value.
value | The bool value. |
|
related |
Get the bool value.
Definition at line 150 of file as_boolean.h.
|
related |
Convert to an as_val.
Definition at line 163 of file as_boolean.h.
|
private |
as_boolean is a subtype of as_val. You can cast as_boolean to as_val.
Definition at line 54 of file as_boolean.h.
bool as_boolean::value |
The boolean value.
Definition at line 59 of file as_boolean.h.