libyang 3.13.5
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
Loading...
Searching...
No Matches
ly_set Struct Reference

Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node, lysp_node or lysc_node objects, but it is not limited to them. Caller is supposed to not mix the type of objects added to the set and according to its knowledge about the set content, it can access objects via the members of the set union. More...

#include <set.h>

Data Fields

union { 
struct lyd_node ** dnodes
void ** objs
struct lysc_node ** snodes
}; 
uint32_t count
uint32_t size

Detailed Description

Structure to hold a set of (not necessary somehow connected) objects. Usually used for lyd_node, lysp_node or lysc_node objects, but it is not limited to them. Caller is supposed to not mix the type of objects added to the set and according to its knowledge about the set content, it can access objects via the members of the set union.

Until ly_set_rm() or ly_set_rm_index() is used, the set keeps the order of the inserted items as they were added into the set, so the first added item is on array index 0.

To free the structure, use ly_set_free() function, to manipulate with the structure, use other ly_set_* functions.

Definition at line 47 of file set.h.

Field Documentation

◆ [union]

union { ... } ly_set

◆ count

uint32_t ly_set::count

number of elements in (used size of) the set array

Definition at line 49 of file set.h.

◆ size

uint32_t ly_set::size

allocated size of the set array

Definition at line 48 of file set.h.


The documentation for this struct was generated from the following file: