![]() |
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 42 of file 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_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) |
|
related |
Destroy the as_boolean and release associated resources.
| boolean | The as_boolean to destroy. |
Definition at line 113 of file as_boolean.h.
|
related |
Convert from an as_val.
Definition at line 167 of file as_boolean.h.
|
related |
Get the bool value.
Definition at line 135 of file as_boolean.h.
|
related |
Get the bool value. If boolean is NULL, then return the fallback value.
Definition at line 126 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 145 of file as_boolean.h.
|
related |
Convert to an as_val.
Definition at line 158 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 49 of file as_boolean.h.
| bool as_boolean::value |
The boolean value.
Definition at line 54 of file as_boolean.h.