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

Classes

struct  nyx_string_t
 Struct describing a JSON string. More...
 

Macros

#define nyx_string_set   nyx_string_set_dup
 Alias to nyx_string_set_dup.
 
#define nyx_string_from   nyx_string_from_dup
 Alias to nyx_string_from_dup.
 

Functions

nyx_string_tnyx_string_t::nyx_string_new ()
 Allocates a new JSON string object.
 
void nyx_string_t::nyx_string_free (nyx_string_t *object)
 Frees memory of the provided JSON string object.
 
STR_t nyx_string_t::nyx_string_get (const nyx_string_t *object)
 Get the value of the provided JSON string object.
 
__INLINE__ bool nyx_string_t::nyx_string_set_dup (nyx_string_t *object, STR_t value)
 Set the value of the provided JSON string object (string duplication).
 
__INLINE__ bool nyx_string_t::nyx_string_set_ref (nyx_string_t *object, STR_t value)
 Set the value of the provided JSON string object (string reference).
 
__INLINE__ bool nyx_string_t::nyx_string_set_buff (nyx_string_t *object, size_t size, BUFF_t buff, bool base64_encode)
 Set the value of the provided JSON string object (buffer reference or base64 encoding).
 
size_t nyx_string_t::nyx_string_length (const nyx_string_t *object)
 Returns the length of the string representing the provided JSON string object.
 
str_t nyx_string_t::nyx_string_to_string (const nyx_string_t *object)
 Returns a string representing the provided JSON string object.
 
str_t nyx_string_t::nyx_string_to_cstring (const nyx_string_t *object)
 Returns a C/C++ string representing the provided JSON string object.
 
__INLINE__ nyx_string_tnyx_string_t::nyx_string_from_dup (STR_t value)
 Returns a JSON string object holding the value of the provided argument (string duplication).
 
__INLINE__ nyx_string_tnyx_string_t::nyx_string_from_ref (STR_t value)
 Returns a JSON string object holding the value of the provided argument (string reference).
 
__INLINE__ nyx_string_tnyx_string_t::nyx_string_from_buff (size_t size, BUFF_t buff, bool base64_encode)
 Returns a JSON string object holding the value of the provided argument (buffer reference or base64 encoding).
 

Detailed Description

Function Documentation

◆ nyx_string_new()

nyx_string_t * nyx_string_new ( )

Allocates a new JSON string object.

Returns
The new JSON string.

◆ nyx_string_free()

void nyx_string_free ( nyx_string_t * object)

Frees memory of the provided JSON string object.

Parameters
objectThe provided JSON string object.

◆ nyx_string_get()

STR_t nyx_string_get ( const nyx_string_t * object)

Get the value of the provided JSON string object.

Parameters
objectThe provided JSON string object.
Returns
The value of the provided JSON string object.

◆ nyx_string_set_dup()

__INLINE__ bool nyx_string_set_dup ( nyx_string_t * object,
STR_t value )

Set the value of the provided JSON string object (string duplication).

Parameters
objectThe provided JSON string object.
valueThe value for the provided JSON string object.
Returns
true if the value was modified, false otherwise.

◆ nyx_string_set_ref()

__INLINE__ bool nyx_string_set_ref ( nyx_string_t * object,
STR_t value )

Set the value of the provided JSON string object (string reference).

Parameters
objectThe provided JSON string object.
valueThe value for the provided JSON string object.
Returns
true if the value was modified, false otherwise.

◆ nyx_string_set_buff()

__INLINE__ bool nyx_string_set_buff ( nyx_string_t * object,
size_t size,
BUFF_t buff,
bool base64_encode )

Set the value of the provided JSON string object (buffer reference or base64 encoding).

Parameters
objectThe provided JSON string object.
sizeThe value size for the provided JSON string object.
buffThe value buffer for the provided JSON string object.
base64_encodeIndicates whether the buffer must be base64-encoded.
Returns
true if the value was modified, false otherwise.

◆ nyx_string_length()

size_t nyx_string_length ( const nyx_string_t * object)

Returns the length of the string representing the provided JSON string object.

Parameters
objectThe provided JSON string object.
Returns

◆ nyx_string_to_string()

str_t nyx_string_to_string ( const nyx_string_t * object)

Returns a string representing the provided JSON string object.

Parameters
objectThe provided object.
Returns
The string representing the provided JSON string object.

◆ nyx_string_to_cstring()

str_t nyx_string_to_cstring ( const nyx_string_t * object)

Returns a C/C++ string representing the provided JSON string object.

Parameters
objectThe provided object.
Returns
The string representing the provided JSON string object.

◆ nyx_string_from_dup()

__INLINE__ nyx_string_t * nyx_string_from_dup ( STR_t value)

Returns a JSON string object holding the value of the provided argument (string duplication).

Parameters
valueThe value for the new JSON string object.
Returns
The new JSON string object.

◆ nyx_string_from_ref()

__INLINE__ nyx_string_t * nyx_string_from_ref ( STR_t value)

Returns a JSON string object holding the value of the provided argument (string reference).

Parameters
valueThe value for the new JSON string object.
Returns
The new JSON string object.

◆ nyx_string_from_buff()

__INLINE__ nyx_string_t * nyx_string_from_buff ( size_t size,
BUFF_t buff,
bool base64_encode )

Returns a JSON string object holding the value of the provided argument (buffer reference or base64 encoding).

Parameters
sizeThe buffer size for the new JSON string object.
buffThe buffer pointer for the new JSON string object.
base64_encodeIndicates whether the buffer must be base64-encoded.
Returns
The new JSON string object.