decode_parent_ref()
#
Parses a parent reference string into its components: topic name, ID, and hook name. The reference format is ‘parent_topic_name^parent_id^hook_name’.
Prototype
BOOL decode_parent_ref(
const char *pref,
char *topic_name, int topic_name_size,
char *id, int id_size,
char *hook_name, int hook_name_size
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The parent reference string in the format ‘parent_topic_name^parent_id^hook_name’. |
|
|
Buffer to store the extracted topic name. |
|
|
Size of the |
|
|
Buffer to store the extracted parent ID. |
|
|
Size of the |
|
|
Buffer to store the extracted hook name. |
|
|
Size of the |
Return Value
Returns TRUE
if the reference was successfully parsed, otherwise returns FALSE
.
Notes
This function is used to extract structured information from a parent reference string, which is used in hierarchical relationships within the tree database.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples