  | 
  
    My Project
    
   programmer's documentation 
   | 
 
 
 
 
Go to the documentation of this file.
   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);
 
  603 static inline cs_tree_node_t *
 
  607                           const char       *tag_value)
 
  633 static inline cs_tree_node_t *
 
  673 static inline cs_tree_node_t *
 
  696 static inline cs_tree_node_t *
 
  719 static inline cs_tree_node_t *
 
  742 static 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);
 
  
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:395
 
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.c:770
 
int flag
Definition: cs_tree.h:69
 
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.c:474
 
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.c:1768
 
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.c:1033
 
char * name
Definition: cs_tree.h:67
 
char * desc
Definition: cs_tree.h:68
 
cs_tree_node_t * children
Definition: cs_tree.h:77
 
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.c:1713
 
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.c:663
 
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.c:1416
 
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.c:905
 
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.c:1328
 
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.c:1086
 
cs_tree_node_t * cs_tree_node_create(const char *name)
Create an empty node.
Definition: cs_tree.c:373
 
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.c:802
 
#define END_C_DECLS
Definition: cs_defs.h:468
 
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.c:976
 
cs_tree_node_t * parent
Definition: cs_tree.h:76
 
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
 
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.c:1531
 
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
 
void * value
Definition: cs_tree.h:71
 
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:674
 
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:345
 
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.c:544
 
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.c:1007
 
int size
Definition: cs_tree.h:72
 
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:1460
 
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:720
 
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.c:1358
 
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.c:1383
 
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.c:1648
 
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:697
 
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.c:873
 
void const cs_int_t const cs_real_t const cs_real_t const cs_real_t const cs_real_t cs_int_t * node
Definition: cs_prototypes.h:122
 
void cs_tree_node_set_name(cs_tree_node_t *node, const char *name)
Name or rename a node.
Definition: cs_tree.c:440
 
cs_log_t
Definition: cs_log.h:48
 
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.c:1743
 
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.c:506
 
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.c:1499
 
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:295
 
void cs_tree_node_free(cs_tree_node_t **pnode)
Free a branch in a tree starting from a node.
Definition: cs_tree.c:408
 
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:634
 
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.c:626
 
cs_tree_node_t * prev
Definition: cs_tree.h:78
 
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.c:699
 
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.c:1615
 
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:743
 
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.c:599
 
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.c:1060
 
cs_tree_node_t * next
Definition: cs_tree.h:80
 
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:604
 
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:1183
 
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.c:1139