 |
libyang
1.0.184
YANG data modeling language library
|
Go to the documentation of this file.
15 #ifndef LIBYANG_CPP_TREE_DATA_H
16 #define LIBYANG_CPP_TREE_DATA_H
23 #include "Internal.hpp"
59 std::vector<S_Type_Bit>
bit();
65 S_Type_Enum
enm() {
return LY_TYPE_ENUM == value_type ? std::make_shared<Type_Enum>(value.
enm, deleter) :
throw "wrong type";};
67 S_Ident
ident() {
return LY_TYPE_IDENT == value_type ? std::make_shared<Ident>(value.
ident, deleter) :
throw "wrong type";};
111 Data_Node(S_Data_Node
parent, S_Module module,
const char *name,
const char *val_str);
115 Data_Node(S_Data_Node
parent, S_Module module,
const char *name, S_Data_Node value);
117 Data_Node(S_Data_Node
parent, S_Module module,
const char *name, S_Xml_Elem value);
121 Data_Node(S_Context context,
const char *
path, S_Data_Node value,
int options);
123 Data_Node(S_Context context,
const char *
path, S_Xml_Elem value,
int options);
154 S_Data_Node
dup(
int recursive);
158 S_Data_Node
dup_to_ctx(
int recursive, S_Context context);
160 int merge(S_Data_Node source,
int options);
162 int merge_to_ctx(S_Data_Node source,
int options, S_Context context);
164 int insert(S_Data_Node new_node);
180 int validate(
int options, S_Context var_arg);
182 int validate(
int options, S_Data_Node var_arg);
186 S_Difflist
diff(S_Data_Node second,
int options);
190 S_Data_Node
new_path(S_Context ctx, const
char *
path, S_Data_Node value,
int options);
192 S_Data_Node
new_path(S_Context ctx, const
char *
path, S_Xml_Elem value,
int options);
198 S_Attr
insert_attr(S_Module module, const
char *name, const
char *value);
206 std::vector<S_Data_Node>
tree_for();
208 std::vector<S_Data_Node>
tree_dfs();
248 S_Data_Node
child() {
return nullptr;};
280 S_Data_Node
child() {
return nullptr;};
295 Attr(
struct lyd_attr *attr, S_Deleter deleter =
nullptr);
303 const
char *
name() {
return attr->name;};
328 std::vector<S_Data_Node>
first();
330 std::vector<S_Data_Node>
second();
S_Data_Node first_sibling()
lyd_anydata_value value()
int schema_sort(int recursive)
Value(lyd_val value, LY_DATA_TYPE *value_type, uint8_t value_flags, struct lys_type *type, S_Deleter deleter)
class for wrapping lyd_val.
class for wrapping lyd_attr.
int insert(S_Data_Node new_node)
struct lyd_node * C_lyd_node()
class for wrapping lyd_node_leaf_list.
YANG type structure providing information from the schema.
std::vector< S_Data_Node > second()
Structure for data nodes defined as LYS_LEAF or LYS_LEAFLIST.
class for wrapping lyd_difflist.
int merge(S_Data_Node source, int options)
int merge_to_ctx(S_Data_Node source, int options, S_Context context)
int change_leaf(const char *val_str)
S_Attr insert_attr(S_Module module, const char *name, const char *value)
friend Data_Node_Leaf_List
Difflist(struct lyd_difflist *diff, S_Deleter deleter)
node's value representation
S_Set find_path(const char *expr)
std::vector< S_Type_Bit > bit()
Attr(struct lyd_attr *attr, S_Deleter deleter=nullptr)
std::string print_mem(LYD_FORMAT format, int options)
std::vector< S_Data_Node > first()
classes for wrapping lyd_node.
int validate(int options, S_Context var_arg)
LY_DATA_TYPE value_type()
int validate_value(const char *value)
virtual S_Data_Node child()
Generic structure for a data node, directly applicable to the data nodes defined as LYS_CONTAINER,...
LY_DATA_TYPE value_type()
libyang representation of data trees.
std::vector< S_Data_Node > tree_for()
LYD_FORMAT
Data input/output formats supported by libyang parser and printer functions.
std::vector< S_Data_Node > tree_dfs()
struct lys_type_info_dec64 dec64
Class implementation for libyang C header tree_schema.h.
Structure for data nodes defined as LYS_ANYDATA or LYS_ANYXML.
int insert_sibling(S_Data_Node new_node)
struct lys_type_enum * enm
LY_DATA_TYPE
YANG built-in types.
class for wrapping lyd_node_anydata.
Data_Node(struct lyd_node *node, S_Deleter deleter=nullptr)
LYD_DIFFTYPE
list of possible types of differences in lyd_difflist
S_Data_Node dup_withsiblings(int recursive)
int insert_before(S_Data_Node new_node)
S_Data_Node new_path(S_Context ctx, const char *path, const char *value, LYD_ANYDATA_VALUETYPE value_type, int options)
Structure for the result of lyd_diff(), describing differences between two data trees.
S_Data_Node create_new_Data_Node(struct lyd_node *node)
S_Difflist diff(S_Data_Node second, int options)
LYD_ANYDATA_VALUETYPE
List of possible value types stored in lyd_node_anydata.
LYD_ANYDATA_VALUETYPE value_type()
int insert_after(S_Data_Node new_node)
LY_DATA_TYPE _PACKED value_type
S_Set find_instance(S_Schema_Node schema)
S_Data_Node dup(int recursive)
struct lyd_node * swig_node()
S_Data_Node dup_to_ctx(int recursive, S_Context context)