decode_child_ref()

decode_child_ref()#

Parses a child reference string formatted as ‘child_topic_name^child_id’ and extracts its components into separate buffers.

Prototype

BOOL decode_child_ref(
    const char *pref,
    char *topic_name,    int topic_name_size,
    char *id,           int id_size
);

Parameters

Key

Type

Description

pref

const char *

The child reference string in the format ‘child_topic_name^child_id’.

topic_name

char *

Buffer to store the extracted child topic name.

topic_name_size

int

Size of the ‘topic_name’ buffer.

id

char *

Buffer to store the extracted child ID.

id_size

int

Size of the ‘id’ buffer.


Return Value

Returns TRUE if the reference was successfully parsed, otherwise returns FALSE.

Notes

This function is used to extract child references from hierarchical tree structures in the TreeDB system.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples