Nyx Node
Loading...
Searching...
No Matches
Collaboration diagram for JSON Boolean Object:

Classes

struct  nyx_boolean_t
 Struct describing a JSON boolean object. More...

Functions

nyx_boolean_tnyx_boolean_t::nyx_boolean_new (void)
 Allocates a new JSON boolean object.
bool nyx_boolean_t::nyx_boolean_get (const nyx_boolean_t *object)
 Gets the value of the provided JSON boolean object.
bool nyx_boolean_t::nyx_boolean_set (nyx_boolean_t *object, bool value)
 Sets the value of the provided JSON boolean object.
str_t nyx_boolean_t::nyx_boolean_to_string (const nyx_boolean_t *object)
 Returns a string representing the provided JSON boolean object.
__NYX_INLINE__ nyx_boolean_tnyx_boolean_t::nyx_boolean_from (bool value)
 Returns a JSON boolean object holding the value of the provided argument.

Detailed Description

JSON Boolean Object.


Class Documentation

◆ nyx_boolean_t

struct nyx_boolean_t

Struct describing a JSON boolean object.

Definition at line 820 of file nyx_node.h.

Collaboration diagram for nyx_boolean_t:

Public Member Functions

nyx_boolean_tnyx_boolean_new (void)
 Allocates a new JSON boolean object.
bool nyx_boolean_get (const nyx_boolean_t *object)
 Gets the value of the provided JSON boolean object.
bool nyx_boolean_set (nyx_boolean_t *object, bool value)
 Sets the value of the provided JSON boolean object.
str_t nyx_boolean_to_string (const nyx_boolean_t *object)
 Returns a string representing the provided JSON boolean object.
__NYX_INLINE__ nyx_boolean_tnyx_boolean_from (bool value)
 Returns a JSON boolean object holding the value of the provided argument.

Public Attributes

nyx_object_t base
 Common object header for JSON objects.
bool value
 Boolean payload.

Function Documentation

◆ nyx_boolean_new()

nyx_boolean_t * nyx_boolean_new ( void )

Allocates a new JSON boolean object.

Returns
The new JSON boolean object.

Definition at line 12 of file json_boolean.c.

◆ nyx_boolean_get()

bool nyx_boolean_get ( const nyx_boolean_t * object)

Gets the value of the provided JSON boolean object.

Parameters
objectJSON boolean object.
Returns
The value.

Definition at line 40 of file json_boolean.c.

◆ nyx_boolean_set()

bool nyx_boolean_set ( nyx_boolean_t * object,
bool value )

Sets the value of the provided JSON boolean object.

Parameters
objectJSON boolean object.
valueValue for the provided JSON boolean object.
Returns
true if the value was modified, false otherwise.

Definition at line 47 of file json_boolean.c.

◆ nyx_boolean_to_string()

str_t nyx_boolean_to_string ( const nyx_boolean_t * object)

Returns a string representing the provided JSON boolean object.

Parameters
objectJSON boolean object.
Returns
A newly allocated string that represents the provided JSON boolean object.
Note
Must be freed with nyx_memory_free.

Definition at line 58 of file json_boolean.c.

◆ nyx_boolean_from()

__NYX_INLINE__ nyx_boolean_t * nyx_boolean_from ( bool value)

Returns a JSON boolean object holding the value of the provided argument.

Parameters
valueValue for the new JSON boolean object.
Returns
The new JSON boolean object.

Definition at line 889 of file nyx_node.h.