yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches
Value Node Child Access Support

Manages the storage and access of child nodes within a YANG container or list instance. More...

Collaboration diagram for Value Node Child Access Support:

Data Structures

struct  val_tree_t
 wrapper for the height-balanced tree struct More...
 

Enumerations

enum  val_child_op_t {
  VAL_CHILD_OP_NONE ,
  VAL_CHILD_OP_PREV ,
  VAL_CHILD_OP_SAME ,
  VAL_CHILD_OP_NEXT
}
 modify the procedure call to get the previous, same or next entry More...
 

Functions

status_t val_child_add (val_value_t *child, val_value_t *parent)
 Add a child value node to a parent value node. More...
 
status_t val_child_add_last (val_value_t *child, val_value_t *parent)
 Add a child value node as last node to a parent value node. More...
 
status_t val_child_add_force (val_value_t *child, val_value_t *parent)
 Add a child value node to a parent value node Force add even if Tree Insersion fails. More...
 
status_t val_child_add_force_last (val_value_t *child, val_value_t *parent)
 Add a child value node as last node to a parent value node Force if tree insertion fails. More...
 
val_value_tval_child_find (const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name)
 Find the child node for the specified child name and modname. More...
 
val_value_tval_child_find_next (const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name, const val_value_t *lastmatch)
 Find the next child header for the specified child. More...
 
val_value_tval_child_find_nsid (const val_value_t *parent, xmlns_id_t child_nsid, const xmlChar *child_name)
 Find the child node for the specified child name and namespace ID. More...
 
val_value_tval_child_find_same_nsid (const val_value_t *parent, xmlns_id_t child_nsid, const xmlChar *child_name, val_value_t *curchild, val_child_op_t child_op)
 Find the child node for the specified child name and modname. More...
 
val_value_tval_child_find_obj (const val_value_t *parent, const obj_template_t *child_obj)
 Find the child node for the specified child object header. More...
 
val_value_tval_child_find_same (const val_value_t *child, const val_value_t *parent, val_child_op_t child_op)
 Find the child header for the specified child, which is a different root; e.g., trying to match candidate value in running. More...
 
val_value_tval_child_find_same_lastmatch (const val_value_t *child, const val_value_t *parent, val_value_t *lastmatch, val_child_op_t child_op)
 Find the child header for the specified child. More...
 
val_value_tval_child_find_count (const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name, uint32 *matchcount)
 Find the child node for the specified child name and modname Get the first instance and also return the count. More...
 
val_child_hdr_tval_child_find_hdr (val_value_t *child, val_value_t *parent)
 Find the child header for the specified child. More...
 
val_child_hdr_tval_child_find_hdr_lastmatch (val_value_t *child, val_value_t *parent, val_value_t *lastmatch)
 Find the child header for the specified child based on the last match. More...
 
status_t val_child_insert (val_value_t *child, val_value_t *current, val_value_t *parent, op_insertop_t insert_op)
 Insert a child value node into a parent value node before or after the specified node. More...
 
void val_child_remove (val_value_t *child)
 Remove a child value node from its parent value node. More...
 
void val_child_mark_deleted (val_value_t *child)
 Remove a deleted child value node (mark deleted only) More...
 
void val_child_mark_undeleted (val_value_t *child)
 Re-Add a previously deleted child value node (unmark deleted) More...
 
status_t val_child_swap (val_value_t *newchild, val_value_t *curchild)
 Swap a child value node with a current value node. More...
 
val_value_tval_child_first (const val_value_t *parent)
 Get the first child present for this parent. More...
 
val_value_tval_child_next (const val_value_t *curchild)
 Get the next child present for the current node Parent must be set. More...
 
val_value_tval_child_next_same (val_value_t *curnode)
 Get the next node of the same type. More...
 
val_value_tval_child_prev_same (val_value_t *curnode)
 Get the previous node of the same type. More...
 
val_value_tval_child_first_terminal (const val_value_t *parent)
 Get the first terminal node child present for this parent. More...
 
val_value_tval_child_next_terminal (const val_value_t *curchild)
 Get the next terminal node child present for the current node Parent must be set. More...
 
uint32 val_child_count (val_value_t *parent)
 Get the number of non-deleted children in this parent. More...
 
uint32 val_child_count_nsid (val_value_t *parent, xmlns_id_t nsid, const xmlChar *name, val_value_t **firstval)
 Get the number of non-deleted children matching the NSID and namestring in this parent. More...
 
void val_child_clean_hdrQ (dlq_hdr_t *child_hdrQ)
 Empty and clean a Q of child headers. More...
 
boolean val_child_find_all_children (val_walker2_fn_t walkerfn, void *cookie1, void *cookie2, val_value_t *startnode, xmlns_id_t mod_nsid, const xmlChar *name, boolean configonly, boolean textmode)
 Find all children instances of the specified node(s) The walker fn will be called for each match. More...
 
boolean val_child_find_all_ancestors (val_walker2_fn_t walkerfn, void *cookie1, void *cookie2, val_value_t *startnode, xmlns_id_t mod_nsid, const xmlChar *name, boolean configonly, boolean textmode, boolean orself)
 Find all the ancestor instances of the specified node within the path to root from the current node; use the filter criteria provided. More...
 
boolean val_child_find_all_descendants (val_walker2_fn_t walkerfn, void *cookie1, void *cookie2, val_value_t *startnode, xmlns_id_t mod_nsid, const xmlChar *name, boolean configonly, boolean textmode, boolean orself, boolean forceall)
 Find all occurances of the specified node within the current subtree. More...
 
boolean val_child_find_all_descendants_old (val_walker_fn_t walkerfn, void *cookie1, void *cookie2, val_value_t *startnode, xmlns_id_t mod_nsid, const xmlChar *name, boolean configonly, boolean textmode, boolean orself, boolean forceall)
 Find all occurances of the specified node within the current subtree. More...
 
boolean val_child_find_all_pfaxis (val_walker2_fn_t walkerfn, void *cookie1, void *cookie2, val_value_t *startnode, xmlns_id_t mod_nsid, const xmlChar *name, boolean configonly, boolean dblslash, boolean textmode, ncx_xpath_axis_t axis)
 Find all occurances of the specified node for the specified preceding or following axis. More...
 
boolean val_child_find_all_pfsibling_axis (val_walker2_fn_t walkerfn, void *cookie1, void *cookie2, val_value_t *startnode, xmlns_id_t mod_nsid, const xmlChar *name, boolean configonly, boolean dblslash, boolean textmode, ncx_xpath_axis_t axis)
 Find all occurances of the specified node for the specified axis. More...
 
void val_child_move_children (val_value_t *srcval, val_value_t *destval)
 Move all the child nodes from src to dest Source and dest must both be containers! More...
 
status_t val_child_add_clean (val_editvars_t *editvars, val_value_t *child, val_value_t *parent, dlq_hdr_t *cleanQ)
 Add a child value node to a parent value node This is only called by the agent when adding nodes to a target database. More...
 
status_t val_child_add_clean2 (val_editvars_t *editvars, val_value_t *child, val_value_t *parent, dlq_hdr_t *cleanQ, boolean check_exists)
 Add a child value node to a parent value node. More...
 
status_t val_child_add_clean_test (val_value_t *child, val_value_t *parent, dlq_hdr_t *cleanQ)
 Test the add_child_clean. More...
 
status_t val_child_add_clean3 (val_editvars_t *editvars, val_value_t *child, val_value_t *parent, boolean check_exists)
 Add a child value node to a parent value node. More...
 
void val_child_mark_default_deleted (val_value_t *val)
 Mark all the leaf-list nodes that are defaults as deleted. More...
 
void val_child_finish_default_deleted (val_value_t *val)
 Delete all the marked default leaf-list nodes. More...
 
void val_child_mark_default_undeleted (val_value_t *val)
 Mark all the leaf-list nodes that are defaults as deleted. More...
 
val_value_tval_child_first_test (val_value_t *parent, val_hdr_test_fn_t hdr_test_fn, val_test2_fn_t test_fn, void *cookie)
 Get the first child present for this parent that passes the callback tests. More...
 
val_value_tval_child_next_test (val_value_t *curchild, val_hdr_test_fn_t hdr_test_fn, val_test2_fn_t test_fn, void *cookie)
 Get the next child present for this parent that passes the callback tests. More...
 
val_value_tval_child_hdr_first (const val_child_hdr_t *hdr)
 Get the first entry in the child header. More...
 
val_value_tval_child_hdr_last (const val_child_hdr_t *hdr)
 Get the last entry in the child header. More...
 
val_value_tval_child_hdr_next (const val_child_hdr_t *hdr, const val_value_t *curval)
 Get the next entry in the child header. More...
 
val_value_tval_child_hdr_previous (const val_child_hdr_t *hdr, const val_value_t *curval)
 Get the previous entry in the child header. More...
 
val_value_tval_child_hdr_find_match (val_child_hdr_t *hdr, const val_value_t *findval)
 Find the matching entry in the hdr. More...
 
boolean val_child_find_deleted (const val_value_t *startnode, const val_value_t *delnode)
 Find the deleted node within the startnode. More...
 
val_tree_tval_tree_new (void)
 Create a new empty val_tree. More...
 
void val_tree_free (val_tree_t *val_tree)
 Clean and free the specified val_tree. More...
 
status_t val_tree_insert (val_value_t *childval, val_tree_t *val_tree, boolean ignore_err, boolean *inserted)
 Add a list entry to the val_tree. More...
 
boolean val_tree_remove (val_value_t *childval, val_tree_t *val_tree)
 Remove a value node from the specified val_tree. More...
 
status_t val_tree_swap (val_value_t *newval, val_value_t *childval, val_tree_t *val_tree)
 Change the node in the specified tree. More...
 
void val_tree_remove_deleted (val_value_t *childval, val_tree_t *val_tree)
 A node is being removed from the tree but not the que because it is marked as VAL_FL_DELETED. More...
 
status_t val_tree_add_undeleted (val_value_t *childval, val_tree_t *val_tree)
 A node is being added back to the the tree but not the que because it was marked as VAL_FL_DELETED. More...
 
val_value_tval_tree_find (const val_value_t *childval, val_tree_t *val_tree)
 Find a value node from the specified val_tree. More...
 

Detailed Description

Manages the storage and access of child nodes within a YANG container or list instance.

Child nodes or a list are stored in a queue to preserve order and usually in an AVL tree for fast lookup by key leaf values.

Enumeration Type Documentation

◆ val_child_op_t

modify the procedure call to get the previous, same or next entry

Enumerator
VAL_CHILD_OP_NONE 

not set

VAL_CHILD_OP_PREV 

get-previous

VAL_CHILD_OP_SAME 

get-exact

VAL_CHILD_OP_NEXT 

get-next

Function Documentation

◆ val_child_add()

status_t val_child_add ( val_value_t child,
val_value_t parent 
)

Add a child value node to a parent value node.

Replaces val_add_child

Parameters
childnode to store in the parent
parentcomplex value node with a child header Q
Returns
status; node is only added if status is NO_ERR

◆ val_child_add_clean()

status_t val_child_add_clean ( val_editvars_t editvars,
val_value_t child,
val_value_t parent,
dlq_hdr_t *  cleanQ 
)

Add a child value node to a parent value node This is only called by the agent when adding nodes to a target database.

Pass in the editvar to use

If the child node being added is part of a choice/case, then all sibling nodes in other cases within the same choice will be deleted

The insert operation will also be check to see if the child is a list oo a leaf-list, which is ordered-by user

The default insert mode is always 'last'

Parameters
editvarsval_editvars_t struct to use (may be NULL)
childnode to store in the parent
parentcomplex value node with a childQ
[out]cleanQaddress of Q to receive any ncx_backptr_t to val_value_t structs for nodes marked as deleted
  • cleanQ may have nodes added if the child being added is part of a case. All other cases will be marked as deleted from the parent Q and nodeptrs added to the cleanQ
Returns
status

◆ val_child_add_clean2()

status_t val_child_add_clean2 ( val_editvars_t editvars,
val_value_t child,
val_value_t parent,
dlq_hdr_t *  cleanQ,
boolean  check_exists 
)

Add a child value node to a parent value node.

This is only called by the agent when adding nodes to a target database.

Pass in the editvar to use

If the child node being added is part of a choice/case, then all sibling nodes in other cases within the same choice will be deleted

The insert operation will also be check to see if the child is a list oo a leaf-list, which is ordered-by user

The default insert mode is always 'last'

Parameters
editvarsval_editvars_t struct to use (may be NULL)
childnode to store in the parent
parentcomplex value node with a childQ
[out]cleanQaddress of Q to receive any ncx_backptr_t to val_value_t structs for nodes marked as deleted
  • cleanQ may have nodes added if the child being added is part of a case. All other cases will be marked as deleted from the parent Q and nodeptrs added to the cleanQ
check_existsTRUE to check if child is a leaf or container or anyxml that exists and delete before adding new one
Returns
status

◆ val_child_add_clean3()

status_t val_child_add_clean3 ( val_editvars_t editvars,
val_value_t child,
val_value_t parent,
boolean  check_exists 
)

Add a child value node to a parent value node.

MUST USE THIS VERSION STARTING 22.10-17, 23.10-5, 23.10T-5

This is only called by the agent when adding nodes to a target database.

Pass in the editvar to use

If the child node being added is part of a choice/case, then all sibling nodes in other cases within the same choice will be deleted

The insert operation will also be check to see if the child is a list oo a leaf-list, which is ordered-by user

The default insert mode is always 'last'

Parameters
editvarsval_editvars_t struct to use (may be NULL)
childnode to store in the parent
parentcomplex value node with a childQ
check_existsTRUE to check if child is a leaf or container or anyxml that exists and delete before adding new one
Returns
status

◆ val_child_add_clean_test()

status_t val_child_add_clean_test ( val_value_t child,
val_value_t parent,
dlq_hdr_t *  cleanQ 
)

Test the add_child_clean.

Gather backpointers to any deleted siblings due to the parent choice changing. If this node causes the current case to be deleted then the cleanQ will have backpointers to these nodes.

Parameters
childnode to store in the parent
parentcomplex value node with a childQ
cleanQaddress of Q to receive any ncx_backptr_t to val_value_t structs for nodes marked as deleted
  • cleanQ may have nodes added if the child being added is part of a case. All other cases will be marked as deleted from the parent Q and nodeptrs added to the cleanQ
Returns
status

◆ val_child_add_force()

status_t val_child_add_force ( val_value_t child,
val_value_t parent 
)

Add a child value node to a parent value node Force add even if Tree Insersion fails.

Parameters
childnode to store in the parent
parentcomplex value node with a child header Q
Returns
status; node is only added if status is NO_ERR
Here is the caller graph for this function:

◆ val_child_add_force_last()

status_t val_child_add_force_last ( val_value_t child,
val_value_t parent 
)

Add a child value node as last node to a parent value node Force if tree insertion fails.

Parameters
childnode to store in the parent
parentcomplex value node with a child header Q
Returns
status; node is only added if status is NO_ERR

◆ val_child_add_last()

status_t val_child_add_last ( val_value_t child,
val_value_t parent 
)

Add a child value node as last node to a parent value node.

Simply makes a new last child!!! Force new last child entry

Parameters
childnode to store in the parent
parentcomplex value node with a child header Q
Returns
status; node is only added if status is NO_ERR
Here is the caller graph for this function:

◆ val_child_clean_hdrQ()

void val_child_clean_hdrQ ( dlq_hdr_t *  child_hdrQ)

Empty and clean a Q of child headers.

Parameters
child_hdrQQ of agt_val_child_hdr_t to clean
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_count()

uint32 val_child_count ( val_value_t parent)

Get the number of non-deleted children in this parent.

Parameters
parentparent val to check
Returns
number of non-deleted children found
Here is the caller graph for this function:

◆ val_child_count_nsid()

uint32 val_child_count_nsid ( val_value_t parent,
xmlns_id_t  nsid,
const xmlChar *  name,
val_value_t **  firstval 
)

Get the number of non-deleted children matching the NSID and namestring in this parent.

Parameters
parentparent val to search
nsidnamespace ID of child
namechild name
[out]firstvaladdress of return first found pointer
  • *firstval first found pointer
Returns
number of matching non-deleted children found
Here is the caller graph for this function:

◆ val_child_find()

val_value_t * val_child_find ( const val_value_t parent,
const xmlChar *  child_modname,
const xmlChar *  child_name 
)

Find the child node for the specified child name and modname.

Parameters
parentparent val to search
child_modnamemodname of child node (NULL to match any module)
child_namelocal-name of child node
Returns
pointer to found child or NULL
Here is the caller graph for this function:

◆ val_child_find_all_ancestors()

boolean val_child_find_all_ancestors ( val_walker2_fn_t  walkerfn,
void *  cookie1,
void *  cookie2,
val_value_t startnode,
xmlns_id_t  mod_nsid,
const xmlChar *  name,
boolean  configonly,
boolean  textmode,
boolean  orself 
)

Find all the ancestor instances of the specified node within the path to root from the current node; use the filter criteria provided.

If the walker function returns TRUE, then the walk will continue; If FALSE it will terminate right away This is an XPath support function for searching the ancestor axis during path evaluation

Parameters
walkerfncallback function to use
cookie1cookie1 value to pass to walker fn
cookie2cookie2 value to pass to walker fn
startnodenode to check
mod_nsidmodule namespace ID; the module with this NSID will be used
== 0: the first match in any namespace will be returned;
namename of ancestor node to find
NULL to match any ancestor name
configonlyTRUE to skip over non-config nodes
FALSE to check all nodes Only used if name == NULL
textmodeTRUE if just testing for text() nodes name and modname will be ignored in this mode
FALSE if using name and modname to filter
orselfTRUE if axis is really ancestor-or-self
FALSE if axis is ancestor
Returns
TRUE if normal termination occurred
FALSE if walker fn requested early termination
Here is the call graph for this function:

◆ val_child_find_all_children()

boolean val_child_find_all_children ( val_walker2_fn_t  walkerfn,
void *  cookie1,
void *  cookie2,
val_value_t startnode,
xmlns_id_t  mod_nsid,
const xmlChar *  name,
boolean  configonly,
boolean  textmode 
)

Find all children instances of the specified node(s) The walker fn will be called for each match.

If the walker function returns TRUE, then the walk will continue; If FALSE it will terminate right away This is an XPath support function for searching the child axis during path evaluation

Parameters
walkerfncallback function to use
cookie1cookie1 value to pass to walker fn
cookie2cookie2 value to pass to walker fn
startnodenode to check
mod_nsidmodule namespace ID; the module with this NSID will be used
== 0: the first match in any namespace will be returned;
namename of child node to find
NULL to match any child name
configonlyTRUE to skip over non-config nodes
FALSE to check all nodes Only used if name == NULL
textmodeTRUE if just testing for text() nodes name and modname will be ignored in this mode
FALSE if using name and modname to filter
Returns
TRUE if normal termination occurred
FALSE if walker fn requested early termination
Here is the call graph for this function:

◆ val_child_find_all_descendants()

boolean val_child_find_all_descendants ( val_walker2_fn_t  walkerfn,
void *  cookie1,
void *  cookie2,
val_value_t startnode,
xmlns_id_t  mod_nsid,
const xmlChar *  name,
boolean  configonly,
boolean  textmode,
boolean  orself,
boolean  forceall 
)

Find all occurances of the specified node within the current subtree.

The walker fn will be called for each match.

If the walker function returns TRUE, then the walk will continue; If FALSE it will terminate right away This is an XPath support function for searching the descendant axis during path evaluation

Parameters
walkerfncallback function to use
cookie1cookie1 value to pass to walker fn
cookie2cookie2 value to pass to walker fn
startnodenode to check
mod_nsidmodule namespace ID; the module with this NSID will be used
== 0: the first match in any namespace will be returned;
namename of descendant node to find
NULL to match any descendant name
configonlyTRUE to skip over non-config nodes
FALSE to check all nodes Only used if name == NULL
textmodeTRUE if just testing for text() nodes name and modname will be ignored in this mode
FALSE if using name and modname to filter
orselfTRUE if axis is really descendant-or-self
FALSE if axis is descendant
forceallTRUE to invoke the descendant callbacks even if fncalled was true from the current (parent) node; FALSE to skip descendants if fncalled was TRUE
Returns
TRUE if normal termination occurred
FALSE if walker fn requested early termination
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_find_all_descendants_old()

boolean val_child_find_all_descendants_old ( val_walker_fn_t  walkerfn,
void *  cookie1,
void *  cookie2,
val_value_t startnode,
xmlns_id_t  mod_nsid,
const xmlChar *  name,
boolean  configonly,
boolean  textmode,
boolean  orself,
boolean  forceall 
)

Find all occurances of the specified node within the current subtree.

The walker fn will be called for each match.

Called for GET2 val node that has no hdr

If the walker function returns TRUE, then the walk will continue; If FALSE it will terminate right away

Parameters
walkerfncallback function to use
cookie1cookie1 value to pass to walker fn
cookie2cookie2 value to pass to walker fn
startnodenode to check
mod_nsidmodule namespace ID; the module with this NSID will be used
== 0: the first match in any namespace will be returned;
namename of descendant node to find
NULL to match any descendant name
configonlyTRUE to skip over non-config nodes
FALSE to check all nodes Only used if name == NULL
textmodeTRUE if just testing for text() nodes name and modname will be ignored in this mode
FALSE if using name and modname to filter
orselfTRUE if axis is really descendant-or-self
FALSE if axis is descendant
forceallTRUE to invoke the descendant callbacks even if fncalled was true from the current (parent) node; FALSE to skip descendants if fncalled was TRUE
Returns
TRUE if normal termination occurred
FALSE if walker fn requested early termination
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_find_all_pfaxis()

boolean val_child_find_all_pfaxis ( val_walker2_fn_t  walkerfn,
void *  cookie1,
void *  cookie2,
val_value_t startnode,
xmlns_id_t  mod_nsid,
const xmlChar *  name,
boolean  configonly,
boolean  dblslash,
boolean  textmode,
ncx_xpath_axis_t  axis 
)

Find all occurances of the specified node for the specified preceding or following axis.

    preceding::*
    following::*

within the current subtree. The walker fn will be called for each match. Because the callbacks will be done in sequential order, starting from the

If the walker function returns TRUE, then the walk will continue; If FALSE it will terminate right away

Parameters
walkerfncallback function to use
cookie1cookie1 value to pass to walker fn
cookie2cookie2 value to pass to walker fn
startnodenode to check
mod_nsidmodule namespace ID; the module with this NSID will be used
== 0: the first match in any namespace will be returned;
namename of preceding or following node to find NULL to match any node name
configonlyTRUE to skip over non-config nodes
FALSE to check all nodes Only used if name == NULL
dblslashTRUE if all decendents of the preceding or following nodes should be checked
FALSE only 1 level is checked, not their descendants
textmodeTRUE if just testing for text() nodes name and modname will be ignored in this mode
FALSE if using name and modname to filter
axisXPath axis enum to use
Returns
TRUE if normal termination occurred

◆ val_child_find_all_pfsibling_axis()

boolean val_child_find_all_pfsibling_axis ( val_walker2_fn_t  walkerfn,
void *  cookie1,
void *  cookie2,
val_value_t startnode,
xmlns_id_t  mod_nsid,
const xmlChar *  name,
boolean  configonly,
boolean  dblslash,
boolean  textmode,
ncx_xpath_axis_t  axis 
)

Find all occurances of the specified node for the specified axis.

    preceding-sibling::*
    following-sibling::*

within the current subtree. The walker fn will be called for each match. Because the callbacks will be done in sequential order, starting from the

If the walker function returns TRUE, then the walk will continue; If FALSE it will terminate right away

Parameters
walkerfncallback function to use
cookie1cookie1 value to pass to walker fn
cookie2cookie2 value to pass to walker fn
startnodenode to check
mod_nsidmodule namespace ID; the module with this NSID will be used
== 0: the first match in any namespace will be returned;
namename of preceding or following node to find NULL to match any node name
configonlyTRUE to skip over non-config nodes
FALSE to check all nodes Only used if name == NULL
dblslashTRUE if all decendents of the preceding or following nodes should be checked
FALSE only 1 level is checked, not their descendants
textmodeTRUE if just testing for text() nodes name and modname will be ignored in this mode
FALSE if using name and modname to filter
axisXPath axis enum to use
Returns
TRUE if normal termination occurred

◆ val_child_find_count()

val_value_t * val_child_find_count ( const val_value_t parent,
const xmlChar *  child_modname,
const xmlChar *  child_name,
uint32 *  matchcount 
)

Find the child node for the specified child name and modname Get the first instance and also return the count.

Parameters
parentparent val to search
child_modnamemodname of child node (NULL to match any module)
child_namelocal-name of child node
[out]matchcountaddress of return match count
  • *matchcount return match count
Returns
pointer to found child or NULL
Here is the caller graph for this function:

◆ val_child_find_deleted()

boolean val_child_find_deleted ( const val_value_t startnode,
const val_value_t delnode 
)

Find the deleted node within the startnode.

  • Check all nodes and does not skip deleted nodes
  • Check descendant or self nodes
Parameters
startnodetop-level node to check all descendants-or-self
delnodedeleted node to find
Returns
TRUE if found; FALSE if not
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_find_hdr()

val_child_hdr_t * val_child_find_hdr ( val_value_t child,
val_value_t parent 
)

Find the child header for the specified child.

Parameters
childsimilar or exact child val to find
parentparent val to search
Returns
child header for this child node or NULL if some error

◆ val_child_find_hdr_lastmatch()

val_child_hdr_t * val_child_find_hdr_lastmatch ( val_value_t child,
val_value_t parent,
val_value_t lastmatch 
)

Find the child header for the specified child based on the last match.

Does not return the child itself Include a pointer to the last header found

Parameters
childsimilar or exact child val to find
parentparent val to search
lastmatchlastmatch child
Returns
child header for the child node or NULL if some error

◆ val_child_find_next()

val_value_t * val_child_find_next ( const val_value_t parent,
const xmlChar *  child_modname,
const xmlChar *  child_name,
const val_value_t lastmatch 
)

Find the next child header for the specified child.

This function is deprecated! Use val_child_next_same instead!

Parameters
parentparent val to search
child_modnamemodname of child node (NULL to match any module)
child_namelocal-name of child node
lastmatchoptional lastmatch found in correct parent
Returns
pointer to found matching child node or NULL
Here is the caller graph for this function:

◆ val_child_find_nsid()

val_value_t * val_child_find_nsid ( const val_value_t parent,
xmlns_id_t  child_nsid,
const xmlChar *  child_name 
)

Find the child node for the specified child name and namespace ID.

Parameters
parentparent val
child_nsidmodule namespace ID of child node
child_namelocal-name of child node to find
Returns
pointer to found child or NULL
Here is the caller graph for this function:

◆ val_child_find_obj()

val_value_t * val_child_find_obj ( const val_value_t parent,
const obj_template_t child_obj 
)

Find the child node for the specified child object header.

Parameters
parentparent val
child_objchild object template to find a value for
Returns
pointer to found child or NULL
Here is the caller graph for this function:

◆ val_child_find_same()

val_value_t * val_child_find_same ( const val_value_t child,
const val_value_t parent,
val_child_op_t  child_op 
)

Find the child header for the specified child, which is a different root; e.g., trying to match candidate value in running.

Parameters
childsimilar child val to find
parentparent val to search
child_op== operation (prev, cur, next)
Returns
pointer to found matching child node or NULL
Here is the caller graph for this function:

◆ val_child_find_same_lastmatch()

val_value_t * val_child_find_same_lastmatch ( const val_value_t child,
const val_value_t parent,
val_value_t lastmatch,
val_child_op_t  child_op 
)

Find the child header for the specified child.

Parameters
childsimilar child val to find
parentparent val to search
lastmatchoptional lastmatch found in correct parent
child_opoperation (prev, cur, next)
Returns
pointer to found matching child node or NULL
Here is the caller graph for this function:

◆ val_child_find_same_nsid()

val_value_t * val_child_find_same_nsid ( const val_value_t parent,
xmlns_id_t  child_nsid,
const xmlChar *  child_name,
val_value_t curchild,
val_child_op_t  child_op 
)

Find the child node for the specified child name and modname.

Parameters
parentparent val
child_nsidmodule namespace ID of child node
child_namelocal-name of child node
curchildcurrent child to find an entry after this one
child_opoperation (prev, cur, next)
Returns
pointer to found child or NULL
Here is the caller graph for this function:

◆ val_child_finish_default_deleted()

void val_child_finish_default_deleted ( val_value_t val)

Delete all the marked default leaf-list nodes.

Parameters
valval_value_t struct of first leaf-list to check
Here is the call graph for this function:

◆ val_child_first()

val_value_t * val_child_first ( const val_value_t parent)

Get the first child present for this parent.

Parameters
parentparent node
Returns
first child
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_first_terminal()

val_value_t * val_child_first_terminal ( const val_value_t parent)

Get the first terminal node child present for this parent.

Parameters
parentparent nodeto search
Returns
first terminal child or NULL if none found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_first_test()

val_value_t * val_child_first_test ( val_value_t parent,
val_hdr_test_fn_t  hdr_test_fn,
val_test2_fn_t  test_fn,
void *  cookie 
)

Get the first child present for this parent that passes the callback tests.

Each header will be checked first. If true returned then val_test_fn is checked If both return true then the node is returned as 'first'

Parameters
parentparent node
hdr_test_fnheader test function
test_fnvalue test function
cookieopaque user parameter
Returns
first child that passes test; NULL if no first
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_hdr_find_match()

val_value_t * val_child_hdr_find_match ( val_child_hdr_t hdr,
const val_value_t findval 
)

Find the matching entry in the hdr.

Parameters
hdrheader to check
findvalvalue to find
Returns
value if found; NULL if not found

◆ val_child_hdr_first()

val_value_t * val_child_hdr_first ( const val_child_hdr_t hdr)

Get the first entry in the child header.

Parameters
hdrheader to check
Returns
first non-deleted entry or NULL if none
Here is the caller graph for this function:

◆ val_child_hdr_last()

val_value_t * val_child_hdr_last ( const val_child_hdr_t hdr)

Get the last entry in the child header.

Parameters
hdrheader to check
Returns
last non-deleted entry or NULL if none
Here is the caller graph for this function:

◆ val_child_hdr_next()

val_value_t * val_child_hdr_next ( const val_child_hdr_t hdr,
const val_value_t curval 
)

Get the next entry in the child header.

Parameters
hdrheader to check
curvalcurrent value
Returns
next non-deleted entry or NULL if none
Here is the caller graph for this function:

◆ val_child_hdr_previous()

val_value_t * val_child_hdr_previous ( const val_child_hdr_t hdr,
const val_value_t curval 
)

Get the previous entry in the child header.

Parameters
hdrheader to check
curvalcurrent value
Returns
previous non-deleted entry or NULL if none

◆ val_child_insert()

status_t val_child_insert ( val_value_t child,
val_value_t current,
val_value_t parent,
op_insertop_t  insert_op 
)

Insert a child value node into a parent value node before or after the specified node.

Parameters
childnode to store in the parent
currentlast node that was stored in the parent (may be NULL)
parentcomplex value node with a childQ
insert_opinsert operation enum (first, last, before, after)
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_mark_default_deleted()

void val_child_mark_default_deleted ( val_value_t val)

Mark all the leaf-list nodes that are defaults as deleted.

Parameters
valval_value_t struct of first leaf-list to check
Here is the call graph for this function:

◆ val_child_mark_default_undeleted()

void val_child_mark_default_undeleted ( val_value_t val)

Mark all the leaf-list nodes that are defaults as deleted.

Parameters
valval_value_t struct of first leaf-list to check
Here is the call graph for this function:

◆ val_child_mark_deleted()

void val_child_mark_deleted ( val_value_t child)

Remove a deleted child value node (mark deleted only)

NEEDS SPECIAL HANDLING FOR agt_val.c

Parameters
childnode to mark deleted
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_mark_undeleted()

void val_child_mark_undeleted ( val_value_t child)

Re-Add a previously deleted child value node (unmark deleted)

NEEDS SPECIAL HANDLING FOR agt_val.c

Parameters
childnode to add back
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_move_children()

void val_child_move_children ( val_value_t srcval,
val_value_t destval 
)

Move all the child nodes from src to dest Source and dest must both be containers!

Parameters
srcvalsource val_value_t struct to move
destvaldestination value struct ot use
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_next()

val_value_t * val_child_next ( const val_value_t curchild)

Get the next child present for the current node Parent must be set.

Parameters
curchildcurrent child to get next for
Returns
next child or NULL if no non-deleted next child
Here is the caller graph for this function:

◆ val_child_next_same()

val_value_t * val_child_next_same ( val_value_t curnode)

Get the next node of the same type.

Parameters
curnodecurrent list entry
Returns
pointer to next list entry or NULL if none
Here is the caller graph for this function:

◆ val_child_next_terminal()

val_value_t * val_child_next_terminal ( const val_value_t curchild)

Get the next terminal node child present for the current node Parent must be set.

Parameters
curchildcurrent child to get next terminal for
Returns
next terminal child or NULL if no non-deleted next child
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_next_test()

val_value_t * val_child_next_test ( val_value_t curchild,
val_hdr_test_fn_t  hdr_test_fn,
val_test2_fn_t  test_fn,
void *  cookie 
)

Get the next child present for this parent that passes the callback tests.

Each header will be checked first. If true returned then val_test_fn is checked If both return true then the node is returned as 'first'

Parameters
curchildcurrent node to start next at
hdr_test_fnheader test function
test_fnvalue test function
cookieopaque user parameter
Returns
first child that passes test; NULL if none found
Here is the caller graph for this function:

◆ val_child_prev_same()

val_value_t * val_child_prev_same ( val_value_t curnode)

Get the previous node of the same type.

Parameters
curnodecurrent list entry
Returns
pointer to previous list entry

◆ val_child_remove()

void val_child_remove ( val_value_t child)

Remove a child value node from its parent value node.

Parameters
childnode to store in the parent
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_child_swap()

status_t val_child_swap ( val_value_t newchild,
val_value_t curchild 
)

Swap a child value node with a current value node.

Parameters
newchildnode to store in the place of the curchild
curchildnode to remove from the parent
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ val_tree_add_undeleted()

status_t val_tree_add_undeleted ( val_value_t childval,
val_tree_t val_tree 
)

A node is being added back to the the tree but not the que because it was marked as VAL_FL_DELETED.

but there was a rollback so now it is needs to be put back in the tree

Parameters
childvalchild value to add back
val_treeval_tree to use for removal
Returns
status
Here is the caller graph for this function:

◆ val_tree_find()

val_value_t * val_tree_find ( const val_value_t childval,
val_tree_t val_tree 
)

Find a value node from the specified val_tree.

Parameters
childvalsimilar child value to find
val_treeval_tree to use for search
Returns
pointer to value node found

◆ val_tree_free()

void val_tree_free ( val_tree_t val_tree)

Clean and free the specified val_tree.

Parameters
val_treetree to clean and free

◆ val_tree_insert()

status_t val_tree_insert ( val_value_t childval,
val_tree_t val_tree,
boolean  ignore_err,
boolean *  inserted 
)

Add a list entry to the val_tree.

Before or after the specified node Check for duplicates

Parameters
childvalchild value to add
val_treeval_tree to use for insertion
ignore_errTRUE to return TRUE if skipped because sanity failed
[out]insertedaddress of return inserted flag
  • *inserted TRUE if the childval was inserted successfully.
    FALSE otherwise. Usefull when inserting with ignore_err == TRUE
Returns
status
Here is the call graph for this function:

◆ val_tree_new()

val_tree_t * val_tree_new ( void  )

Create a new empty val_tree.

Returns
malloced AVL tree or NULL if error

◆ val_tree_remove()

boolean val_tree_remove ( val_value_t childval,
val_tree_t val_tree 
)

Remove a value node from the specified val_tree.

Parameters
childvalchild value to remove
val_treeval_tree to use for removal
Returns
TRUE if removed; FALSE if not
Here is the caller graph for this function:

◆ val_tree_remove_deleted()

void val_tree_remove_deleted ( val_value_t childval,
val_tree_t val_tree 
)

A node is being removed from the tree but not the que because it is marked as VAL_FL_DELETED.

Parameters
childvalchild value to remove
val_treeval_tree to use for removal
Here is the caller graph for this function:

◆ val_tree_swap()

status_t val_tree_swap ( val_value_t newval,
val_value_t childval,
val_tree_t val_tree 
)

Change the node in the specified tree.

Parameters
newvalchild value to take its place
childvalchild value to remove
val_treeval_tree to use for removal
Returns
status
Here is the caller graph for this function: