51#define CS_TREE_NODE_CHAR (1 << 0)
52#define CS_TREE_NODE_INT (1 << 1)
53#define CS_TREE_NODE_REAL (1 << 2)
54#define CS_TREE_NODE_BOOL (1 << 3)
56#define CS_TREE_NODE_TAG (1 << 4)
213 const char *tag_str);
416 const char *child_name);
433 const char *child_name);
451 const char *child_name);
468 const char *child_name);
513 const char *tag_value);
528 const cs_tree_node_t *node);
603static inline cs_tree_node_t *
607 const char *tag_value)
633static inline cs_tree_node_t *
673static inline cs_tree_node_t *
696static inline cs_tree_node_t *
719static inline cs_tree_node_t *
742static inline cs_tree_node_t *
787 const char *sub_path);
809 cs_tree_node_t *current,
810 const char *sub_path);
855 cs_tree_node_t *current,
874 const char *sub_path);
908 const cs_tree_node_t *node);
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
cs_log_t
Definition: cs_log.h:48
static cs_tree_node_t * cs_tree_get_or_add_node(cs_tree_node_t *node, const char *path)
Retrieve the pointer to a node, adding it if not present.
Definition: cs_tree.h:633
static void cs_tree_node_set_value_bool(cs_tree_node_t *node, bool val)
Assign a single boolean value to a node.
Definition: cs_tree.h:294
void cs_tree_node_set_name(cs_tree_node_t *node, const char *name)
Name or rename a node.
Definition: cs_tree.cpp:440
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:1713
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:544
static cs_tree_node_t * cs_tree_add_child_bool(cs_tree_node_t *parent, const char *name, bool val)
Create and add a boolean-valued node in a tree below the given node.
Definition: cs_tree.h:696
static cs_tree_node_t * cs_tree_add_child_real(cs_tree_node_t *parent, const char *name, cs_real_t val)
Create and add an real-valued node in a tree below the given node.
Definition: cs_tree.h:742
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 node.
Definition: cs_tree.cpp:1416
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:663
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:1183
static 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)
Retrieve the pointer to a node with a child having a given (character string) tag value.
Definition: cs_tree.h:603
static cs_tree_node_t * cs_tree_add_child_int(cs_tree_node_t *parent, const char *name, int val)
Create and add an integer-valued node in a tree below the given node.
Definition: cs_tree.h:719
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:1615
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:1383
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 a given node.
Definition: cs_tree.cpp:1768
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:905
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:599
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:626
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:1060
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:1743
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:1531
static void cs_tree_node_set_value_real(cs_tree_node_t *node, cs_real_t val)
Assign a single real value to a node.
Definition: cs_tree.h:394
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:770
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:1139
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:873
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:1086
cs_tree_node_t * cs_tree_node_create(const char *name)
Create an empty node.
Definition: cs_tree.cpp:373
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:1033
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:1460
static cs_tree_node_t * cs_tree_add_child_str(cs_tree_node_t *parent, const char *name, const char *val_str)
Create and add a string-valued node in a tree below the given node.
Definition: cs_tree.h:673
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:699
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:474
static void cs_tree_node_set_value_int(cs_tree_node_t *node, int val)
Assign a single integer value to a node.
Definition: cs_tree.h:344
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:1499
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:976
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:1648
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:1007
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:1358
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:802
void cs_tree_node_free(cs_tree_node_t **pnode)
Free a branch in a tree starting from a node.
Definition: cs_tree.cpp:408
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:1328
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:506
void * value
Definition: cs_tree.h:70
cs_tree_node_t * children
Definition: cs_tree.h:76
char * desc
Definition: cs_tree.h:67
int size
Definition: cs_tree.h:71
char * name
Definition: cs_tree.h:66
cs_tree_node_t * parent
Definition: cs_tree.h:75
cs_tree_node_t * next
Definition: cs_tree.h:79
int flag
Definition: cs_tree.h:68
cs_tree_node_t * prev
Definition: cs_tree.h:77