|
Nyx Node
|

Classes | |
| struct | nyx_list_iter_t |
| Struct describing a JSON list iterator. More... | |
| struct | nyx_list_t |
| Struct describing a JSON list object. More... | |
Macros | |
| #define | NYX_LIST_ITER(list) |
| Initializes a JSON list iterator. | |
Functions | |
| nyx_list_t * | nyx_list_t::nyx_list_new (void) |
| Allocates a new JSON list. | |
| void | nyx_list_t::nyx_list_clear (nyx_list_t *object) |
| Clears the content of the provided JSON list object. | |
| void | nyx_list_t::nyx_list_del (nyx_list_t *object, size_t idx) |
| Deletes the entry at the provided index. | |
| bool | nyx_list_t::nyx_list_iterate (nyx_list_iter_t *iter, size_t *idx, nyx_object_t **object) |
| Iterates over a JSON list object. | |
| nyx_object_t * | nyx_list_t::nyx_list_get (const nyx_list_t *object, size_t idx) |
| Gets the JSON object at the provided index. | |
| __NYX_INLINE__ bool | nyx_list_t::nyx_list_push (nyx_list_t *object, void *value) |
| Pushes a JSON object in the provided JSON list object. | |
| size_t | nyx_list_t::nyx_list_size (const nyx_list_t *object) |
| Gets the number of items in the provided JSON list object. | |
| str_t | nyx_list_t::nyx_list_to_string (const nyx_list_t *object) |
| Returns a string representing the provided JSON list object. | |
| __NYX_INLINE__ bool | nyx_list_t::nyx_list_get_boolean (const nyx_list_t *object, size_t idx) |
| Gets a boolean value at the provided index. | |
| __NYX_INLINE__ double | nyx_list_t::nyx_list_get_number (const nyx_list_t *list, size_t idx) |
| Gets a number value at the provided index. | |
| __NYX_INLINE__ STR_t | nyx_list_t::nyx_list_get_string (const nyx_list_t *list, size_t idx) |
| Gets a text value at the provided index. | |
| __NYX_INLINE__ void | nyx_list_t::nyx_list_get_buff (const nyx_list_t *list, size_t idx, __NYX_NULLABLE__ size_t *result_size, __NYX_NULLABLE__ buff_t *result_buff) |
| Gets the content of the provided index as a byte buffer. | |
| __NYX_INLINE__ bool | nyx_list_t::nyx_list_set_boolean (const nyx_list_t *list, size_t idx, bool value) |
| Sets a boolean value of an existing index holding a boolean. | |
| __NYX_INLINE__ bool | nyx_list_t::nyx_list_set_number (const nyx_list_t *list, size_t idx, double value) |
| Sets a number value of an existing index holding a number. | |
| __NYX_INLINE__ bool | nyx_list_t::nyx_list_set_string (const nyx_list_t *list, size_t idx, STR_t value, bool managed) |
| Sets a text value of an existing index holding a string. | |
| __NYX_INLINE__ bool | nyx_list_t::nyx_list_set_buff (const nyx_list_t *list, size_t idx, size_t size, BUFF_t buff, bool managed) |
| Sets the content of an existing index holding a string from a byte buffer. | |
JSON List Object.
| struct nyx_list_iter_t |
Struct describing a JSON list iterator.
Definition at line 1442 of file nyx_node.h.
Public Attributes | |
| size_t | idx |
| Current zero-based iteration index. | |
| struct nyx_list_node_s * | head |
| Next JSON object to visit. | |
| struct nyx_list_t |
Struct describing a JSON list object.
Public Member Functions | |
| nyx_list_t * | nyx_list_new (void) |
| Allocates a new JSON list. | |
| void | nyx_list_clear (nyx_list_t *object) |
| Clears the content of the provided JSON list object. | |
| void | nyx_list_del (nyx_list_t *object, size_t idx) |
| Deletes the entry at the provided index. | |
| bool | nyx_list_iterate (nyx_list_iter_t *iter, size_t *idx, nyx_object_t **object) |
| Iterates over a JSON list object. | |
| nyx_object_t * | nyx_list_get (const nyx_list_t *object, size_t idx) |
| Gets the JSON object at the provided index. | |
| __NYX_INLINE__ bool | nyx_list_push (nyx_list_t *object, void *value) |
| Pushes a JSON object in the provided JSON list object. | |
| size_t | nyx_list_size (const nyx_list_t *object) |
| Gets the number of items in the provided JSON list object. | |
| str_t | nyx_list_to_string (const nyx_list_t *object) |
| Returns a string representing the provided JSON list object. | |
| __NYX_INLINE__ bool | nyx_list_get_boolean (const nyx_list_t *object, size_t idx) |
| Gets a boolean value at the provided index. | |
| __NYX_INLINE__ double | nyx_list_get_number (const nyx_list_t *list, size_t idx) |
| Gets a number value at the provided index. | |
| __NYX_INLINE__ STR_t | nyx_list_get_string (const nyx_list_t *list, size_t idx) |
| Gets a text value at the provided index. | |
| __NYX_INLINE__ void | nyx_list_get_buff (const nyx_list_t *list, size_t idx, __NYX_NULLABLE__ size_t *result_size, __NYX_NULLABLE__ buff_t *result_buff) |
| Gets the content of the provided index as a byte buffer. | |
| __NYX_INLINE__ bool | nyx_list_set_boolean (const nyx_list_t *list, size_t idx, bool value) |
| Sets a boolean value of an existing index holding a boolean. | |
| __NYX_INLINE__ bool | nyx_list_set_number (const nyx_list_t *list, size_t idx, double value) |
| Sets a number value of an existing index holding a number. | |
| __NYX_INLINE__ bool | nyx_list_set_string (const nyx_list_t *list, size_t idx, STR_t value, bool managed) |
| Sets a text value of an existing index holding a string. | |
| __NYX_INLINE__ bool | nyx_list_set_buff (const nyx_list_t *list, size_t idx, size_t size, BUFF_t buff, bool managed) |
| Sets the content of an existing index holding a string from a byte buffer. | |
| #define NYX_LIST_ITER | ( | list | ) |
Initializes a JSON list iterator.
| list | JSON list object. |
Definition at line 1457 of file nyx_node.h.
| nyx_list_t * nyx_list_new | ( | void | ) |
| void nyx_list_clear | ( | nyx_list_t * | object | ) |
Clears the content of the provided JSON list object.
| object | JSON list object. |
Definition at line 82 of file json_list.c.
| void nyx_list_del | ( | nyx_list_t * | object, |
| size_t | idx ) |
Deletes the entry at the provided index.
| object | JSON list object. |
| idx | Index. |
Definition at line 89 of file json_list.c.
| bool nyx_list_iterate | ( | nyx_list_iter_t * | iter, |
| size_t * | idx, | ||
| nyx_object_t ** | object ) |
Iterates over a JSON list object.
| iter | List iterator. |
| idx | Pointer to the current element index. |
| object | Pointer to the current JSON object. |
Definition at line 134 of file json_list.c.
| nyx_object_t * nyx_list_get | ( | const nyx_list_t * | object, |
| size_t | idx ) |
Gets the JSON object at the provided index.
| object | JSON list object. |
| idx | Index. |
Definition at line 157 of file json_list.c.
| __NYX_INLINE__ bool nyx_list_push | ( | nyx_list_t * | object, |
| void * | value ) |
Pushes a JSON object in the provided JSON list object.
| object | JSON list object. |
| value | JSON object to be added. |
Definition at line 1560 of file nyx_node.h.
| size_t nyx_list_size | ( | const nyx_list_t * | object | ) |
Gets the number of items in the provided JSON list object.
| object | JSON list object. |
Definition at line 256 of file json_list.c.
| str_t nyx_list_to_string | ( | const nyx_list_t * | object | ) |
Returns a string representing the provided JSON list object.
| object | JSON list object. |
Definition at line 271 of file json_list.c.
| __NYX_INLINE__ bool nyx_list_get_boolean | ( | const nyx_list_t * | object, |
| size_t | idx ) |
Gets a boolean value at the provided index.
| object | JSON list object. |
| idx | Index. |
Definition at line 1602 of file nyx_node.h.
| __NYX_INLINE__ double nyx_list_get_number | ( | const nyx_list_t * | list, |
| size_t | idx ) |
Gets a number value at the provided index.
| list | JSON list object. |
| idx | Index. |
Definition at line 1621 of file nyx_node.h.
| __NYX_INLINE__ STR_t nyx_list_get_string | ( | const nyx_list_t * | list, |
| size_t | idx ) |
Gets a text value at the provided index.
| list | JSON list object. |
| idx | Index. |
Definition at line 1641 of file nyx_node.h.
| __NYX_INLINE__ void nyx_list_get_buff | ( | const nyx_list_t * | list, |
| size_t | idx, | ||
| __NYX_NULLABLE__ size_t * | result_size, | ||
| __NYX_NULLABLE__ buff_t * | result_buff ) |
Gets the content of the provided index as a byte buffer.
| list | JSON list object. |
| idx | Index. |
| result_size | Pointer receiving the number of content bytes. |
| result_buff | Pointer receiving the content buffer. |
Definition at line 1662 of file nyx_node.h.
| __NYX_INLINE__ bool nyx_list_set_boolean | ( | const nyx_list_t * | list, |
| size_t | idx, | ||
| bool | value ) |
Sets a boolean value of an existing index holding a boolean.
| list | JSON list object. |
| idx | Index. |
| value | Boolean value to set. |
Definition at line 1680 of file nyx_node.h.
| __NYX_INLINE__ bool nyx_list_set_number | ( | const nyx_list_t * | list, |
| size_t | idx, | ||
| double | value ) |
Sets a number value of an existing index holding a number.
| list | JSON list object. |
| idx | Index. |
| value | Number value to set. |
Definition at line 1700 of file nyx_node.h.
| __NYX_INLINE__ bool nyx_list_set_string | ( | const nyx_list_t * | list, |
| size_t | idx, | ||
| STR_t | value, | ||
| bool | managed ) |
Sets a text value of an existing index holding a string.
| list | JSON list object. |
| idx | Index. |
| value | Text value to set. |
| managed | If true, ownership of the provided value is transferred to the object. |
Definition at line 1721 of file nyx_node.h.
| __NYX_INLINE__ bool nyx_list_set_buff | ( | const nyx_list_t * | list, |
| size_t | idx, | ||
| size_t | size, | ||
| BUFF_t | buff, | ||
| bool | managed ) |
Sets the content of an existing index holding a string from a byte buffer.
| list | JSON list object. |
| idx | Index. |
| size | Number of content bytes. |
| buff | Content buffer. |
| managed | If true, ownership of the provided buffer is transferred to the object. |
Definition at line 1743 of file nyx_node.h.