libyang 1.0.184
YANG data modeling language library
Loading...
Searching...
No Matches
Data_Node Class Reference

classes for wrapping lyd_node. More...

#include <Tree_Data.hpp>

Inheritance diagram for Data_Node:

Public Member Functions

 Data_Node (struct lyd_node *node, S_Deleter deleter=nullptr)
 Data_Node (S_Data_Node parent, S_Module module, const char *name)
 Data_Node (S_Data_Node parent, S_Module module, const char *name, const char *val_str)
 Data_Node (S_Data_Node parent, S_Module module, const char *name, const char *value, LYD_ANYDATA_VALUETYPE value_type)
 Data_Node (S_Data_Node parent, S_Module module, const char *name, S_Data_Node value)
 Data_Node (S_Data_Node parent, S_Module module, const char *name, S_Xml_Elem value)
 Data_Node (S_Context context, const char *path, const char *value, LYD_ANYDATA_VALUETYPE value_type, int options)
 Data_Node (S_Context context, const char *path, S_Data_Node value, int options)
 Data_Node (S_Context context, const char *path, S_Xml_Elem value, int options)
virtual ~Data_Node ()
S_Schema_Node schema ()
uint8_t validity ()
uint8_t dflt ()
uint8_t when_status ()
S_Attr attr ()
S_Data_Node next ()
S_Data_Node prev ()
S_Data_Node parent ()
virtual S_Data_Node child ()
std::string path ()
S_Data_Node dup (int recursive)
S_Data_Node dup_withsiblings (int recursive)
S_Data_Node dup_to_ctx (int recursive, S_Context context)
int merge (S_Data_Node source, int options)
int merge_to_ctx (S_Data_Node source, int options, S_Context context)
int insert (S_Data_Node new_node)
int insert_sibling (S_Data_Node new_node)
int insert_before (S_Data_Node new_node)
int insert_after (S_Data_Node new_node)
int schema_sort (int recursive)
S_Set find_path (const char *expr)
S_Set find_instance (S_Schema_Node schema)
S_Data_Node first_sibling ()
int validate (int options, S_Context var_arg)
int validate (int options, S_Data_Node var_arg)
int validate_value (const char *value)
S_Difflist diff (S_Data_Node second, int options)
S_Data_Node new_path (S_Context ctx, const char *path, const char *value, LYD_ANYDATA_VALUETYPE value_type, int options)
S_Data_Node new_path (S_Context ctx, const char *path, S_Data_Node value, int options)
S_Data_Node new_path (S_Context ctx, const char *path, S_Xml_Elem value, int options)
unsigned int list_pos ()
int unlink ()
S_Attr insert_attr (S_Module module, const char *name, const char *value)
S_Module node_module ()
std::string print_mem (LYD_FORMAT format, int options)
std::vector< S_Data_Node > tree_for ()
std::vector< S_Data_Node > tree_dfs ()
struct lyd_nodeswig_node ()
S_Deleter swig_deleter ()
struct lyd_nodeC_lyd_node ()

Data Fields

friend Set
friend Data_Node_Anydata
friend Data_Node_Leaf_List

Detailed Description

classes for wrapping lyd_node.

Definition at line 103 of file Tree_Data.hpp.

Constructor & Destructor Documentation

◆ Data_Node() [1/9]

Data_Node ( struct lyd_node * node,
S_Deleter deleter = nullptr )

wrapper for struct lyd_node, for internal use only

Definition at line 68 of file Tree_Data.cpp.

◆ Data_Node() [2/9]

Data_Node ( S_Data_Node parent,
S_Module module,
const char * name )

wrapper for lyd_new

Definition at line 72 of file Tree_Data.cpp.

◆ Data_Node() [3/9]

Data_Node ( S_Data_Node parent,
S_Module module,
const char * name,
const char * val_str )

wrapper for lyd_new_leaf

Definition at line 87 of file Tree_Data.cpp.

◆ Data_Node() [4/9]

Data_Node ( S_Data_Node parent,
S_Module module,
const char * name,
const char * value,
LYD_ANYDATA_VALUETYPE value_type )

wrapper for lyd_new_anydata

Definition at line 102 of file Tree_Data.cpp.

◆ Data_Node() [5/9]

Data_Node ( S_Data_Node parent,
S_Module module,
const char * name,
S_Data_Node value )

wrapper for lyd_new_anydata

Definition at line 117 of file Tree_Data.cpp.

◆ Data_Node() [6/9]

Data_Node ( S_Data_Node parent,
S_Module module,
const char * name,
S_Xml_Elem value )

wrapper for lyd_new_anydata

Definition at line 133 of file Tree_Data.cpp.

◆ Data_Node() [7/9]

Data_Node ( S_Context context,
const char * path,
const char * value,
LYD_ANYDATA_VALUETYPE value_type,
int options )

wrapper for lyd_new_path

Definition at line 149 of file Tree_Data.cpp.

◆ Data_Node() [8/9]

Data_Node ( S_Context context,
const char * path,
S_Data_Node value,
int options )

wrapper for lyd_new_path

Definition at line 167 of file Tree_Data.cpp.

◆ Data_Node() [9/9]

Data_Node ( S_Context context,
const char * path,
S_Xml_Elem value,
int options )

wrapper for lyd_new_path

Definition at line 185 of file Tree_Data.cpp.

◆ ~Data_Node()

~Data_Node ( )
virtual

Definition at line 204 of file Tree_Data.cpp.

Member Function Documentation

◆ schema()

S_Schema_Node schema ( )
inline

get schema variable from lyd_node

Definition at line 132 of file Tree_Data.hpp.

◆ validity()

uint8_t validity ( )
inline

get validity variable from lyd_node

Definition at line 134 of file Tree_Data.hpp.

◆ dflt()

uint8_t dflt ( )
inline

get dflt variable from lyd_node

Definition at line 136 of file Tree_Data.hpp.

◆ when_status()

uint8_t when_status ( )
inline

get when_status variable from lyd_node

Definition at line 138 of file Tree_Data.hpp.

◆ attr()

S_Attr attr ( )

get attr variable from lyd_node

Definition at line 205 of file Tree_Data.cpp.

◆ next()

S_Data_Node next ( )
inline

get next variable from lyd_node

Definition at line 142 of file Tree_Data.hpp.

◆ prev()

S_Data_Node prev ( )
inline

get prev variable from lyd_node

Definition at line 144 of file Tree_Data.hpp.

◆ parent()

S_Data_Node parent ( )
inline

get parent variable from lyd_node

Definition at line 146 of file Tree_Data.hpp.

◆ child()

virtual S_Data_Node child ( )
inlinevirtual

get child variable from lyd_node

Reimplemented in Data_Node_Anydata, and Data_Node_Leaf_List.

Definition at line 148 of file Tree_Data.hpp.

◆ path()

std::string path ( )

wrapper for lyd_path

Definition at line 206 of file Tree_Data.cpp.

◆ dup()

S_Data_Node dup ( int recursive)

wrapper for lyd_dup

Definition at line 219 of file Tree_Data.cpp.

◆ dup_withsiblings()

S_Data_Node dup_withsiblings ( int recursive)

wrapper for lyd_dup_withsiblings

Definition at line 230 of file Tree_Data.cpp.

◆ dup_to_ctx()

S_Data_Node dup_to_ctx ( int recursive,
S_Context context )

wrapper for lyd_dup_to_ctx

Definition at line 241 of file Tree_Data.cpp.

◆ merge()

int merge ( S_Data_Node source,
int options )

wrapper for lyd_merge

Definition at line 253 of file Tree_Data.cpp.

◆ merge_to_ctx()

int merge_to_ctx ( S_Data_Node source,
int options,
S_Context context )

wrapper for lyd_merge_to_ctx

Definition at line 266 of file Tree_Data.cpp.

◆ insert()

int insert ( S_Data_Node new_node)

wrapper for lyd_insert

Definition at line 279 of file Tree_Data.cpp.

◆ insert_sibling()

int insert_sibling ( S_Data_Node new_node)

wrapper for lyd_insert_sibling

Definition at line 292 of file Tree_Data.cpp.

◆ insert_before()

int insert_before ( S_Data_Node new_node)

wrapper for lyd_insert_before

Definition at line 311 of file Tree_Data.cpp.

◆ insert_after()

int insert_after ( S_Data_Node new_node)

wrapper for lyd_insert_after

Definition at line 330 of file Tree_Data.cpp.

◆ schema_sort()

int schema_sort ( int recursive)

wrapper for lyd_schema_sort

Definition at line 349 of file Tree_Data.cpp.

◆ find_path()

S_Set find_path ( const char * expr)

wrapper for lyd_find_path

Definition at line 356 of file Tree_Data.cpp.

◆ find_instance()

S_Set find_instance ( S_Schema_Node schema)

wrapper for lyd_find_instance

Definition at line 364 of file Tree_Data.cpp.

◆ first_sibling()

S_Data_Node first_sibling ( )

wrapper for lyd_first_sibling

Definition at line 377 of file Tree_Data.cpp.

◆ validate() [1/2]

int validate ( int options,
S_Context var_arg )

wrapper for lyd_validate

Definition at line 384 of file Tree_Data.cpp.

◆ validate() [2/2]

int validate ( int options,
S_Data_Node var_arg )

wrapper for lyd_validate

Definition at line 391 of file Tree_Data.cpp.

◆ validate_value()

int validate_value ( const char * value)

wrapper for lyd_validate_value

Definition at line 405 of file Tree_Data.cpp.

◆ diff()

S_Difflist diff ( S_Data_Node second,
int options )

wrapper for lyd_diff

Definition at line 412 of file Tree_Data.cpp.

◆ new_path() [1/3]

S_Data_Node new_path ( S_Context ctx,
const char * path,
const char * value,
LYD_ANYDATA_VALUETYPE value_type,
int options )

wrapper for lyd_new_path

Definition at line 426 of file Tree_Data.cpp.

◆ new_path() [2/3]

S_Data_Node new_path ( S_Context ctx,
const char * path,
S_Data_Node value,
int options )

wrapper for lyd_new_path

Definition at line 436 of file Tree_Data.cpp.

◆ new_path() [3/3]

S_Data_Node new_path ( S_Context ctx,
const char * path,
S_Xml_Elem value,
int options )

wrapper for lyd_new_path

Definition at line 450 of file Tree_Data.cpp.

◆ list_pos()

unsigned int list_pos ( )

wrapper for lyd_list_pos

Definition at line 464 of file Tree_Data.cpp.

◆ unlink()

int unlink ( )

wrapper for lyd_unlink

Definition at line 471 of file Tree_Data.cpp.

◆ insert_attr()

S_Attr insert_attr ( S_Module module,
const char * name,
const char * value )

wrapper for lyd_insert_attr

Definition at line 484 of file Tree_Data.cpp.

◆ node_module()

S_Module node_module ( )

wrapper for lyd_node_module

Definition at line 494 of file Tree_Data.cpp.

◆ print_mem()

std::string print_mem ( LYD_FORMAT format,
int options )

wrapper for lyd_print_mem

Definition at line 504 of file Tree_Data.cpp.

◆ tree_for()

std::vector< S_Data_Node > tree_for ( )

wrapper for macro LY_TREE_FOR

Definition at line 519 of file Tree_Data.cpp.

◆ tree_dfs()

std::vector< S_Data_Node > tree_dfs ( )

wrapper for macro LY_TREE_DFS_BEGIN and LY_TREE_DFS_END

Definition at line 529 of file Tree_Data.cpp.

◆ swig_node()

struct lyd_node * swig_node ( )
inline

SWIG related wrappers, for internal use only

Definition at line 211 of file Tree_Data.hpp.

◆ swig_deleter()

S_Deleter swig_deleter ( )
inline

SWIG related wrappers, for internal use only

Definition at line 213 of file Tree_Data.hpp.

◆ C_lyd_node()

struct lyd_node * C_lyd_node ( )
inline

libnetconf2 related wrappers, for internal use only

Definition at line 220 of file Tree_Data.hpp.

Field Documentation

◆ Set

friend Set

Definition at line 215 of file Tree_Data.hpp.

◆ Data_Node_Anydata

friend Data_Node_Anydata

Definition at line 216 of file Tree_Data.hpp.

◆ Data_Node_Leaf_List

friend Data_Node_Leaf_List

Definition at line 217 of file Tree_Data.hpp.


The documentation for this class was generated from the following files: