51 #define CS_TREE_NODE_INTEGER (1 << 0)
52 #define CS_TREE_NODE_REAL (1 << 1)
53 #define CS_TREE_NODE_BOOL (1 << 2)
194 const cs_tree_node_t *node);
229 const cs_tree_node_t *
247 static inline const char *
283 static inline cs_tree_node_t *
286 const char *val_name)
321 static inline cs_tree_node_t *
344 static inline cs_tree_node_t *
367 static inline cs_tree_node_t *
402 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 a node in a tree below the given parent node This node has one integer value set to va...
Definition: cs_tree.h:345
char * name
Definition: cs_tree.h:63
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.c:283
void cs_tree_free(cs_tree_node_t **proot)
Free a branch in a tree starting from root. If root is the real root of the tree, the whole tree is f...
Definition: cs_tree.c:684
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
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. This node can be modified. This node is located...
Definition: cs_tree.c:556
const cs_tree_node_t * cs_tree_get_node(const cs_tree_node_t *root, const char *path)
Retrieve the pointer to a node in read-only access. This node is located at "path" from the given roo...
Definition: cs_tree.c:584
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:382
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:717
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:355
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:408
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:329
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:306
char * desc
Definition: cs_tree.h:64
cs_log_t
Definition: cs_log.h:47
cs_tree_node_t * children
Definition: cs_tree.h:73
static cs_tree_node_t * cs_tree_add_string_child(cs_tree_node_t *parent, const char *name, const char *val_name)
Create and add a node in a tree below the given parent node This node has a string value set to val_n...
Definition: cs_tree.h:284
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:653
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 node in a tree below the given parent node This node has one real value set to val...
Definition: cs_tree.h:368
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:609
cs_tree_node_t * cs_tree_node_create(const char *name)
Create an empty node. Only the name is assigned if given.
Definition: cs_tree.c:221
#define END_C_DECLS
Definition: cs_defs.h:454
static const char * cs_tree_get_node_string_val(const cs_tree_node_t *root, const char *path)
Retrieve the pointer to the value member of the node in case of a string. Read-only access is allowed...
Definition: cs_tree.h:248
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 node in a tree below the given parent node This node has one boolean value set to va...
Definition: cs_tree.h:322
void cs_tree_node_free(cs_tree_node_t **pnode)
Free a cs_tree_node_t structure.
Definition: cs_tree.c:254