51 #define CS_TREE_NODE_INTEGER (1 << 0) 52 #define CS_TREE_NODE_REAL (1 << 1) 53 #define CS_TREE_NODE_BOOL (1 << 2) 229 const cs_tree_node_t *node);
269 const cs_tree_node_t *
288 static inline const char *
293 return (
const char *)(node->value);
325 static inline cs_tree_node_t *
352 static inline cs_tree_node_t *
391 static inline cs_tree_node_t *
416 static inline cs_tree_node_t *
439 static inline cs_tree_node_t *
465 static inline cs_tree_node_t *
489 static inline cs_tree_node_t *
515 static inline cs_tree_node_t *
539 const cs_tree_node_t *root);
static cs_tree_node_t * cs_tree_add_int_child(cs_tree_node_t *parent, const char *name, int val)
Create and add an integer-valued node in a tree below the given parent node.
Definition: cs_tree.h:466
static void cs_tree_node_set_string_val(cs_tree_node_t *node, const char *val)
Allocate the value member of a node and assign to it a string.
Definition: cs_tree.h:151
char * name
Definition: cs_tree.h:63
void cs_tree_node_set_val_string(cs_tree_node_t *node, const char *val)
Allocate the value member of a node and assign to it a string.
Definition: cs_tree.c:358
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 a real-valued node in a tree below the given parent node.
Definition: cs_tree.h:490
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 parent node.
Definition: cs_tree.h:440
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 parent node.
Definition: cs_tree.h:392
static cs_tree_node_t * cs_tree_add_string_child(cs_tree_node_t *parent, const char *name, const char *val_str)
Create and add a node in a tree below the given parent node.
Definition: cs_tree.h:353
#define BEGIN_C_DECLS
Definition: cs_defs.h:461
cs_tree_node_t * cs_tree_get_node_rw(cs_tree_node_t *root, const char *path)
Retrieve the pointer to the value member of the node.
Definition: cs_tree.c:635
const cs_tree_node_t * cs_tree_get_node(const cs_tree_node_t *root, const char *path)
Retrieve the pointer to a node with read-only access.
Definition: cs_tree.c:665
void cs_tree_node_set_real_val(cs_tree_node_t *node, int size, const cs_real_t *val)
Allocate the value member of a node and assign to it an array of real values.
Definition: cs_tree.c:462
int size
Definition: cs_tree.h:68
cs_tree_node_t * prev
Definition: cs_tree.h:74
void cs_tree_dump(cs_log_t log, int depth, const cs_tree_node_t *root)
Dump a cs_tree_node_t structure starting from the node "root".
Definition: cs_tree.c:766
void cs_tree_node_set_int_val(cs_tree_node_t *node, int size, const int *val)
Allocate the value member of a node and assign to it an integer.
Definition: cs_tree.c:435
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.c:488
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
void cs_tree_node_set_bool_val(cs_tree_node_t *node, int size, const bool *val)
Allocate the value member of a node and assign to it a boolean.
Definition: cs_tree.c:409
cs_tree_node_t * next
Definition: cs_tree.h:76
int flag
Definition: cs_tree.h:65
void cs_tree_node_set_bool(cs_tree_node_t *node, bool val)
Allocate the value member of a node and assign to it a boolean.
Definition: cs_tree.c:386
void cs_tree_node_set_name(cs_tree_node_t *node, const char *name)
Name or rename a node.
Definition: cs_tree.c:336
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 node in a tree below the given parent node.
Definition: cs_tree.h:326
char * desc
Definition: cs_tree.h:64
cs_log_t
Definition: cs_log.h:48
cs_tree_node_t * children
Definition: cs_tree.h:73
void * value
Definition: cs_tree.h:67
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.c:734
static cs_tree_node_t * cs_tree_add_real_child(cs_tree_node_t *parent, const char *name, cs_real_t val)
Create and add a real-valued node in a tree below the given parent node.
Definition: cs_tree.h:516
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.c:690
cs_tree_node_t * cs_tree_node_create(const char *name)
Create an empty node.
Definition: cs_tree.c:269
#define END_C_DECLS
Definition: cs_defs.h:462
static const char * cs_tree_get_node_string_val(const cs_tree_node_t *root, const char *path)
Retrieve a read-only pointer to the value member of the node in case of a string. ...
Definition: cs_tree.h:289
cs_tree_node_t * parent
Definition: cs_tree.h:72
static cs_tree_node_t * cs_tree_add_bool_child(cs_tree_node_t *parent, const char *name, bool val)
Create and add a boolean-valued node in a tree below the given parent node.
Definition: cs_tree.h:417
void cs_tree_node_free(cs_tree_node_t **pnode)
Free a branch in a tree starting from a node.
Definition: cs_tree.c:304