libyang 3.4.2
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Loading...
Searching...
No Matches
Data duplication options
Collaboration diagram for Data duplication options:

Macros

#define LYD_DUP_NO_EXT   0x10
 
#define LYD_DUP_NO_LYDS   0x40
 
#define LYD_DUP_NO_META   0x02
 
#define LYD_DUP_RECURSIVE   0x01
 
#define LYD_DUP_WITH_FLAGS   0x08
 
#define LYD_DUP_WITH_PARENTS   0x04
 
#define LYD_DUP_WITH_PRIV   0x20
 

Detailed Description

Various options to change lyd_dup_single() and lyd_dup_siblings() behavior.

Default behavior:

Macro Definition Documentation

◆ LYD_DUP_NO_EXT

#define LYD_DUP_NO_EXT   0x10

Do not duplicate nodes with the LYD_EXT flag (nested extension instance data).

Definition at line 1969 of file tree_data.h.

◆ LYD_DUP_NO_LYDS

#define LYD_DUP_NO_LYDS   0x40

The order of nodes is used the same as for copied nodes and a 'lyds_tree' is not created, so the flag is suitable for optimization. If a new node is inserted into such a (leaf-)list by default, the 'lyds_tree' will be created additionally and the sorting will work.

Definition at line 1975 of file tree_data.h.

◆ LYD_DUP_NO_META

#define LYD_DUP_NO_META   0x02

Do not duplicate metadata (or attributes) of any node. Flag has no effect on 'lyds_tree' metadata.

Definition at line 1964 of file tree_data.h.

◆ LYD_DUP_RECURSIVE

#define LYD_DUP_RECURSIVE   0x01

Duplicate not just the node but also all the children. Note that list's keys are always duplicated.

Definition at line 1962 of file tree_data.h.

◆ LYD_DUP_WITH_FLAGS

#define LYD_DUP_WITH_FLAGS   0x08

Also copy any data node flags. That will cause the duplicated data to preserve its validation/default node state.

Definition at line 1968 of file tree_data.h.

◆ LYD_DUP_WITH_PARENTS

#define LYD_DUP_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 1966 of file tree_data.h.

◆ LYD_DUP_WITH_PRIV

#define LYD_DUP_WITH_PRIV   0x20

Also copy data node private pointer. Only the pointer is copied, it still points to the same data.

Definition at line 1971 of file tree_data.h.