libyang  1.0.253
YANG data modeling language library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Data duplication options
Collaboration diagram for Data duplication options:

Macros

#define LYD_DUP_OPT_RECURSIVE   0x01
 
#define LYD_DUP_OPT_NO_ATTR   0x02
 
#define LYD_DUP_OPT_WITH_PARENTS   0x04
 
#define LYD_DUP_OPT_WITH_KEYS   0x08
 
#define LYD_DUP_OPT_WITH_WHEN   0x10
 

Detailed Description

Various options to change lyd_dup() behavior.

Default behavior:

Macro Definition Documentation

#define LYD_DUP_OPT_RECURSIVE   0x01

Duplicate not just the node but also all the children.

Definition at line 992 of file tree_data.h.

#define LYD_DUP_OPT_NO_ATTR   0x02

Do not duplicate attributes of any node.

Definition at line 993 of file tree_data.h.

#define LYD_DUP_OPT_WITH_PARENTS   0x04

If a nested node is being duplicated, duplicate also all the parents. Keys are also duplicated for lists. Return value does not change!

Definition at line 994 of file tree_data.h.

#define LYD_DUP_OPT_WITH_KEYS   0x08

If a lits key is being duplicated non-recursively, duplicate its keys. Ignored if used with LYD_DUP_OPT_RECURSIVE. Return value does not change!

Definition at line 997 of file tree_data.h.

#define LYD_DUP_OPT_WITH_WHEN   0x10

Also copy any when evaluation state flags. This is useful in case the copied nodes are actually still part of the same datastore meaning no dependency data could have changed. Otherwise nothing is assumed about the copied node when state and it is evaluated from scratch during validation.

Definition at line 1000 of file tree_data.h.