47#define CS_TREE_NODE_CHAR (1 << 0)
48#define CS_TREE_NODE_INT (1 << 1)
49#define CS_TREE_NODE_REAL (1 << 2)
50#define CS_TREE_NODE_BOOL (1 << 3)
52#define CS_TREE_NODE_TAG (1 << 4)
209 const char *tag_str);
412 const char *child_name);
429 const char *child_name);
447 const char *child_name);
464 const char *child_name);
509 const char *tag_value);
524 const cs_tree_node_t *node);
599inline cs_tree_node_t *
603 const char *tag_value)
629inline cs_tree_node_t *
669inline cs_tree_node_t *
692inline cs_tree_node_t *
715inline cs_tree_node_t *
738inline cs_tree_node_t *
783 const char *sub_path);
805 cs_tree_node_t *current,
806 const char *sub_path);
851 cs_tree_node_t *current,
870 const char *sub_path);
904 const cs_tree_node_t *node);
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_log_t
Definition: cs_log.h:44
void cs_tree_node_set_name(cs_tree_node_t *node, const char *name)
Name or rename a node.
Definition: cs_tree.cpp:436
int cs_tree_get_sub_node_count(cs_tree_node_t *root, const char *sub_path)
Count a node's descendants matching a given sub-path.
Definition: cs_tree.cpp:1709
const char * cs_tree_node_get_tag(cs_tree_node_t *node, const char *tag)
Search for a child node (used as a tag) with a given name, and return its associated string value.
Definition: cs_tree.cpp:540
void cs_tree_node_set_value_bool(cs_tree_node_t *node, bool val)
Definition: cs_tree.h:290
cs_tree_node_t * cs_tree_add_child(cs_tree_node_t *parent, const char *name)
Create and add a node in a tree below the given parent node.
Definition: cs_tree.cpp:1412
void cs_tree_node_set_value_str(cs_tree_node_t *node, const char *val)
Assign a character string value to a node.
Definition: cs_tree.cpp:659
void cs_tree_node_dump(cs_log_t log, int depth, const cs_tree_node_t *node)
Dump a cs_tree_node_t structure.
Definition: cs_tree.cpp:1179
cs_tree_node_t * cs_tree_find_node_simple(cs_tree_node_t *root, const char *name)
Retrieve the pointer to a node's descendants matching a given name.
Definition: cs_tree.cpp:1611
int cs_tree_get_node_count(cs_tree_node_t *node, const char *path)
Count number of nodes sharing a given path.
Definition: cs_tree.cpp:1379
cs_tree_node_t * cs_tree_add_child_bool(cs_tree_node_t *parent, const char *name, bool val)
Definition: cs_tree.h:692
void cs_tree_dump(cs_log_t log, int depth, const cs_tree_node_t *node)
Dump a cs_tree_node_t structure starting from the node "root".
Definition: cs_tree.cpp:1764
const cs_real_t * cs_tree_node_get_values_real(cs_tree_node_t *node)
Return an array of real values associated to a node if present.
Definition: cs_tree.cpp:901
void cs_tree_node_set_tag(cs_tree_node_t *node, const char *tag, const char *tag_str)
Assign a tag to a given node.
Definition: cs_tree.cpp:595
const char * cs_tree_node_get_value_str(cs_tree_node_t *node)
Return a character string value associated to a node if present.
Definition: cs_tree.cpp:622
const int * cs_tree_node_get_child_values_int(cs_tree_node_t *node, const char *child_name)
Return an array of integer values associated to a child node if present.
Definition: cs_tree.cpp:1056
int cs_tree_get_sub_node_count_simple(cs_tree_node_t *root, const char *name)
Count a node's descendants with a given name.
Definition: cs_tree.cpp:1739
cs_tree_node_t * cs_tree_get_node_with_tag(cs_tree_node_t *node, const char *path, const char *tag, const char *tag_value)
Definition: cs_tree.h:599
void cs_tree_node_set_value_int(cs_tree_node_t *node, int val)
Definition: cs_tree.h:340
cs_tree_node_t * cs_tree_find_node_next(cs_tree_node_t *root, cs_tree_node_t *current, const char *sub_path)
Retrieve the pointer to the next node matching a given sub-path and following a given node in a depth...
Definition: cs_tree.cpp:1527
void cs_tree_node_set_values_bool(cs_tree_node_t *node, int n, const bool *val)
Assign an array of boolean values to node.
Definition: cs_tree.cpp:766
cs_tree_node_t * cs_tree_node_get_sibling_with_tag(cs_tree_node_t *node, const char *tag, const char *tag_value)
Retrieve the pointer to a node with a child having a given (character string) tag value.
Definition: cs_tree.cpp:1135
void cs_tree_node_set_values_int(cs_tree_node_t *node, int n, const int *val)
Assign an array of integer values to a node.
Definition: cs_tree.cpp:869
const cs_real_t * cs_tree_node_get_child_values_real(cs_tree_node_t *node, const char *child_name)
Return an array of real values associated to a child node if present.
Definition: cs_tree.cpp:1082
cs_tree_node_t * cs_tree_node_create(const char *name)
Create an empty node.
Definition: cs_tree.cpp:369
const bool * cs_tree_node_get_child_values_bool(cs_tree_node_t *node, const char *child_name)
Return array of boolean values associated to a child node if present.
Definition: cs_tree.cpp:1029
cs_tree_node_t * cs_tree_add_sibling(cs_tree_node_t *sibling, const char *name)
Create and add a node in a tree at the right of the given node.
Definition: cs_tree.cpp:1456
const bool * cs_tree_node_get_values_bool(cs_tree_node_t *node)
Return array of boolean values associated to a node if present.
Definition: cs_tree.cpp:695
cs_tree_node_t * cs_tree_node_get_child(cs_tree_node_t *node, const char *name)
Return a child node with a given name.
Definition: cs_tree.cpp:470
cs_tree_node_t * cs_tree_find_node(cs_tree_node_t *root, const char *sub_path)
Retrieve the pointer to a node matching a given sub-path.
Definition: cs_tree.cpp:1495
void cs_tree_node_set_value_real(cs_tree_node_t *node, cs_real_t val)
Definition: cs_tree.h:390
cs_tree_node_t * cs_tree_add_child_real(cs_tree_node_t *parent, const char *name, cs_real_t val)
Definition: cs_tree.h:738
void cs_tree_node_set_values_real(cs_tree_node_t *node, int n, const cs_real_t *val)
Assign an array of real values to a node.
Definition: cs_tree.cpp:972
cs_tree_node_t * cs_tree_find_node_next_simple(cs_tree_node_t *root, cs_tree_node_t *current, const char *name)
Retrieve the pointer to the next node with a given name and following a given node in a depth-first o...
Definition: cs_tree.cpp:1644
const char * cs_tree_node_get_child_value_str(cs_tree_node_t *node, const char *child_name)
Return a string value associated to a child node if present.
Definition: cs_tree.cpp:1003
cs_tree_node_t * cs_tree_get_node(cs_tree_node_t *node, const char *path)
Retrieve the pointer to a node matching a given path.
Definition: cs_tree.cpp:1354
const int * cs_tree_node_get_values_int(cs_tree_node_t *node)
Return an array of integer values associated to a node if present.
Definition: cs_tree.cpp:798
void cs_tree_node_free(cs_tree_node_t **pnode)
Free a branch in a tree starting from a node.
Definition: cs_tree.cpp:404
cs_tree_node_t * cs_tree_add_child_str(cs_tree_node_t *parent, const char *name, const char *val_str)
Definition: cs_tree.h:669
cs_tree_node_t * cs_tree_get_or_add_node(cs_tree_node_t *node, const char *path)
Definition: cs_tree.h:629
cs_tree_node_t * cs_tree_add_node(cs_tree_node_t *node, const char *path)
Add a node to a tree.
Definition: cs_tree.cpp:1324
cs_tree_node_t * cs_tree_add_child_int(cs_tree_node_t *parent, const char *name, int val)
Definition: cs_tree.h:715
cs_tree_node_t * cs_tree_node_get_next_of_name(cs_tree_node_t *node)
Return the next sibling node with the same name (type) as a given node.
Definition: cs_tree.cpp:502
void * value
Definition: cs_tree.h:66
cs_tree_node_t * children
Definition: cs_tree.h:72
char * desc
Definition: cs_tree.h:63
int size
Definition: cs_tree.h:67
char * name
Definition: cs_tree.h:62
cs_tree_node_t * parent
Definition: cs_tree.h:71
cs_tree_node_t * next
Definition: cs_tree.h:75
int flag
Definition: cs_tree.h:64
cs_tree_node_t * prev
Definition: cs_tree.h:73