gobj_topic_jtree()
#
gobj_topic_jtree()
returns a hierarchical tree representation of a topic’s self-linked structure, optionally filtering and renaming hooks.
Prototype
json_t *gobj_topic_jtree(
hgobj gobj,
const char *topic_name,
const char *hook,
const char *rename_hook,
json_t *kw,
json_t *jn_filter,
json_t *jn_options,
hgobj src
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The GObj instance managing the topic tree. |
|
|
The name of the topic whose tree structure is to be retrieved. |
|
|
The hook defining the hierarchical relationship between nodes. |
|
|
An optional new name for the hook in the returned tree. |
|
|
A JSON object containing the ‘id’ and pkey2s fields used to find the root node. |
|
|
A JSON object specifying filters to match records in the tree. |
|
|
A JSON object containing options such as fkey and hook configurations. |
|
|
The source GObj requesting the topic tree. |
Return Value
Returns a JSON object representing the hierarchical tree of the specified topic. The caller must free the returned JSON object.
Notes
[“If ‘webix’ is set in jn_options
, the function returns the tree in Webix format (dict-list).”, “The __path__
field in all records follows the ‘idid
…’ format.”, ‘If no root node is specified, the first node with no parent is used.’, ‘If gobj
is NULL or destroyed, an error is logged and NULL is returned.’, ‘If mt_topic_jtree
is not defined in the GClass, an error is logged and NULL is returned.’]
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples