libyang 1.0.184
YANG data modeling language library
Loading...
Searching...
No Matches
lyd_node_leaf_list Struct Reference

Structure for data nodes defined as LYS_LEAF or LYS_LEAFLIST. More...

#include <tree_data.h>

Public Member Functions

LY_DATA_TYPE __attribute__ ((__packed__)) value_type

Data Fields

struct lys_nodeschema
uint8_t validity
uint8_t dflt:1
uint8_t when_status:3
struct lyd_attrattr
struct lyd_nodenext
struct lyd_nodeprev
struct lyd_nodeparent
void * priv
uint32_t hash
const char * value_str
lyd_val value
uint8_t value_flags

Detailed Description

Structure for data nodes defined as LYS_LEAF or LYS_LEAFLIST.

Extension for lyd_node structure. It replaces the lyd_node::child member by three new members (value, value_str and #value_type) to provide information about the value. The first five members (schema, attr, next, prev and parent) are compatible with the lyd_node's members.

To traverse through all the child elements or attributes, use LY_TREE_FOR or LY_TREE_FOR_SAFE macro.

Definition at line 217 of file tree_data.h.

Member Function Documentation

◆ __attribute__()

LY_DATA_TYPE __attribute__ ( (__packed__) )

type of the value in the node, mainly for union to avoid repeating of type detection

Field Documentation

◆ schema

struct lys_node* schema

pointer to the schema definition of this node which is lys_node_leaflist structure

Definition at line 218 of file tree_data.h.

◆ validity

uint8_t validity

validity flags

Definition at line 220 of file tree_data.h.

◆ dflt

uint8_t dflt

flag for implicit default node

Definition at line 221 of file tree_data.h.

◆ when_status

uint8_t when_status

bit for checking if the when-stmt condition is resolved - internal use only, do not use this value!

Definition at line 222 of file tree_data.h.

◆ attr

struct lyd_attr* attr

pointer to the list of attributes of this node

Definition at line 225 of file tree_data.h.

◆ next

struct lyd_node* next

pointer to the next sibling node (NULL if there is no one)

Definition at line 226 of file tree_data.h.

◆ prev

struct lyd_node* prev

pointer to the previous sibling node

Note
Note that this pointer is never NULL. If there is no sibling node, pointer points to the node itself. In case of the first node, this pointer points to the last node in the list.

Definition at line 227 of file tree_data.h.

◆ parent

struct lyd_node* parent

pointer to the parent node, NULL in case of root node

Definition at line 231 of file tree_data.h.

◆ priv

void* priv

private user data, not used by libyang

Definition at line 234 of file tree_data.h.

◆ hash

uint32_t hash

hash of this particular node (module name + schema name + string value if leaf-list)

Definition at line 238 of file tree_data.h.

◆ value_str

const char* value_str

string representation of value (for comparison, printing,...), always corresponds to value_type

Definition at line 244 of file tree_data.h.

◆ value

lyd_val value

node's value representation, always corresponds to schema->type.base

Definition at line 245 of file tree_data.h.

◆ value_flags

uint8_t value_flags

value type flags

Definition at line 247 of file tree_data.h.


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