libyang  1.0.184
YANG data modeling language library
Tree_Schema.cpp
Go to the documentation of this file.
1 
15 #include <iostream>
16 #include <memory>
17 #include <stdexcept>
18 #include <vector>
19 
20 #include "Internal.hpp"
21 #include "Libyang.hpp"
22 #include "Tree_Schema.hpp"
23 
24 extern "C" {
25 #include "libyang.h"
26 #include "tree_schema.h"
27 }
28 
29 namespace libyang {
30 
31 Module::Module(struct lys_module *module, S_Deleter deleter):
32  module(module),
33  deleter(deleter)
34 {};
36 S_Revision Module::rev() LY_NEW(module, rev, Revision);
37 std::vector<S_Deviation> Module::deviation() LY_NEW_LIST(module, deviation, deviation_size, Deviation);
38 Submodule::Submodule(struct lys_submodule *submodule, S_Deleter deleter):
39  submodule(submodule),
40  deleter(deleter)
41 {};
42 Submodule::Submodule(S_Module module):
43  submodule((lys_submodule*)module->module),
44  deleter(module->deleter)
45 {
46  if (module->type() != 1) {
47  throw std::invalid_argument("Attempted to cast a YANG module into a YANG submodule");
48  }
49 }
50 std::vector<S_Schema_Node> Module::data_instantiables(int options) {
51  std::vector<S_Schema_Node> s_vector;
52  struct lys_node *iter = NULL;
53 
54  while ((iter = (struct lys_node *)lys_getnext(iter, NULL, module, options))) {
55  s_vector.push_back(std::make_shared<Schema_Node>(iter, deleter));
56  }
57 
58  return s_vector;
59 }
60 std::string Module::print_mem(LYS_OUTFORMAT format, int options) {
61  char *strp = nullptr;
62  int rc = 0;
63 
64  rc = lys_print_mem(&strp, module, format, NULL, 0, options);
65  if (rc) {
66  check_libyang_error(module->ctx);
67  return nullptr;
68  }
69 
70  std::string s_strp = strp;
71  free(strp);
72  return s_strp;
73 }
74 std::string Module::print_mem(LYS_OUTFORMAT format, const char *target, int options) {
75  char *strp = nullptr;
76  int rc = 0;
77 
78  rc = lys_print_mem(&strp, module, format, target, 0, options);
79  if (rc) {
80  check_libyang_error(module->ctx);
81  return nullptr;
82  }
83 
84  std::string s_strp = strp;
85  free(strp);
86  return s_strp;
87 }
88 int Module::feature_enable(const char *feature) {
89  return lys_features_enable(module, feature);
90 }
91 int Module::feature_disable(const char *feature) {
92  return lys_features_disable(module, feature);
93 }
94 int Module::feature_state(const char *feature) {
95  return lys_features_state(module, feature);
96 }
98 S_Revision Submodule::rev() LY_NEW(submodule, rev, Revision);
99 std::vector<S_Deviation> Submodule::deviation() LY_NEW_LIST(submodule, deviation, deviation_size, Deviation);
100 
101 Type_Info_Binary::Type_Info_Binary(struct lys_type_info_binary *info_binary, S_Deleter deleter):
102  info_binary(info_binary),
103  deleter(deleter)
104 {};
106 S_Restr Type_Info_Binary::length() {return info_binary->length ? std::make_shared<Restr>(info_binary->length, deleter) : nullptr;};
107 
108 Type_Bit::Type_Bit(struct lys_type_bit *info_bit, S_Deleter deleter):
109  info_bit(info_bit),
110  deleter(deleter)
111 {};
113 std::vector<S_Ext_Instance> Type_Bit::ext() LY_NEW_P_LIST(info_bit, ext, ext_size, Ext_Instance);
114 std::vector<S_Iffeature> Type_Bit::iffeature() LY_NEW_LIST(info_bit, iffeature, iffeature_size, Iffeature);
115 
116 Type_Info_Bits::Type_Info_Bits(struct lys_type_info_bits *info_bits, S_Deleter deleter):
117  info_bits(info_bits),
118  deleter(deleter)
119 {};
121 std::vector<S_Type_Bit> Type_Info_Bits::bit() LY_NEW_LIST(info_bits, bit, count, Type_Bit);
122 
123 Type_Info_Dec64::Type_Info_Dec64(struct lys_type_info_dec64 *info_dec64, S_Deleter deleter):
124  info_dec64(info_dec64),
125  deleter(deleter)
126 {};
128 S_Restr Type_Info_Dec64::range() {return info_dec64->range ? std::make_shared<Restr>(info_dec64->range, deleter) : nullptr;};
129 
130 Type_Enum::Type_Enum(struct lys_type_enum *info_enum, S_Deleter deleter):
131  info_enum(info_enum),
132  deleter(deleter)
133 {};
135 std::vector<S_Ext_Instance> Type_Enum::ext() LY_NEW_P_LIST(info_enum, ext, ext_size, Ext_Instance);
136 std::vector<S_Iffeature> Type_Enum::iffeature() LY_NEW_LIST(info_enum, iffeature, iffeature_size, Iffeature);
137 
138 Type_Info_Enums::Type_Info_Enums(struct lys_type_info_enums *info_enums, S_Deleter deleter):
139  info_enums(info_enums),
140  deleter(deleter)
141 {};
143 std::vector<S_Type_Enum> Type_Info_Enums::enm() LY_NEW_LIST(info_enums, enm, count, Type_Enum);
144 
145 Type_Info_Ident::Type_Info_Ident(struct lys_type_info_ident *info_ident, S_Deleter deleter):
146  info_ident(info_ident),
147  deleter(deleter)
148 {};
150 std::vector<S_Ident> Type_Info_Ident::ref() LY_NEW_P_LIST(info_ident, ref, count, Ident);
151 
152 Type_Info_Inst::Type_Info_Inst(struct lys_type_info_inst *info_inst, S_Deleter deleter):
153  info_inst(info_inst),
154  deleter(deleter)
155 {};
157 
158 Type_Info_Num::Type_Info_Num(struct lys_type_info_num *info_num, S_Deleter deleter):
159  info_num(info_num),
160  deleter(deleter)
161 {};
163 S_Restr Type_Info_Num::range() {return info_num->range ? std::make_shared<Restr>(info_num->range, deleter) : nullptr;};
164 
165 Type_Info_Lref::Type_Info_Lref(lys_type_info_lref *info_lref, S_Deleter deleter):
166  info_lref(info_lref),
167  deleter(deleter)
168 {};
170 S_Schema_Node_Leaf Type_Info_Lref::target() {return info_lref->target ? std::make_shared<Schema_Node_Leaf>((struct lys_node *)info_lref->target, deleter) : nullptr;};
171 
172 Type_Info_Str::Type_Info_Str(lys_type_info_str *info_str, S_Deleter deleter):
173  info_str(info_str),
174  deleter(deleter)
175 {};
177 S_Restr Type_Info_Str::length() {return info_str->length ? std::make_shared<Restr>(info_str->length, deleter) : nullptr;};
178 S_Restr Type_Info_Str::patterns() {return info_str->patterns ? std::make_shared<Restr>(info_str->patterns, deleter) : nullptr;};
179 
181  info_union(info_union),
182  deleter(deleter)
183 {};
185 std::vector<S_Type> Type_Info_Union::types() LY_NEW_LIST(info_union, types, count, Type);
186 
187 Type_Info::Type_Info(union lys_type_info info, LY_DATA_TYPE *type, uint8_t flags, S_Deleter deleter):
188  info(info),
189  type(*type),
190  flags(flags),
191  deleter(deleter)
192 {};
194 S_Type_Info_Binary Type_Info::binary() {return LY_TYPE_BINARY == type ? std::make_shared<Type_Info_Binary>(&info.binary, deleter) : nullptr;};
195 S_Type_Info_Bits Type_Info::bits() {return LY_TYPE_BITS == type ? std::make_shared<Type_Info_Bits>(&info.bits, deleter) : nullptr;};
196 S_Type_Info_Dec64 Type_Info::dec64() {return LY_TYPE_DEC64 == type ? std::make_shared<Type_Info_Dec64>(&info.dec64, deleter) : nullptr;};
197 S_Type_Info_Enums Type_Info::enums() {return LY_TYPE_ENUM == type ? std::make_shared<Type_Info_Enums>(&info.enums, deleter) : nullptr;};
198 S_Type_Info_Ident Type_Info::ident() {return LY_TYPE_IDENT == type ? std::make_shared<Type_Info_Ident>(&info.ident, deleter) : nullptr;};
199 S_Type_Info_Inst Type_Info::inst() {return LY_TYPE_INST == type ? std::make_shared<Type_Info_Inst>(&info.inst, deleter) : nullptr;};
200 S_Type_Info_Num Type_Info::num() {
201  if (type >= LY_TYPE_INT8 && type <= LY_TYPE_UINT64) {
202  return std::make_shared<Type_Info_Num>(&info.num, deleter);
203  } else {
204  return nullptr;
205  }
206 };
207 S_Type_Info_Lref Type_Info::lref() {return LY_TYPE_LEAFREF == type ? std::make_shared<Type_Info_Lref>(&info.lref, deleter) : nullptr;};
208 S_Type_Info_Str Type_Info::str() {return LY_TYPE_STRING == type ? std::make_shared<Type_Info_Str>(&info.str, deleter) : nullptr;};
209 S_Type_Info_Union Type_Info::uni() {return LY_TYPE_UNION == type ? std::make_shared<Type_Info_Union>(&info.uni, deleter) : nullptr;};
210 
211 Type::Type(struct lys_type *type, S_Deleter deleter):
212  type(type),
213  deleter(deleter)
214 {};
216 std::vector<S_Ext_Instance> Type::ext() LY_NEW_P_LIST(type, ext, ext_size, Ext_Instance);
217 S_Tpdf Type::der() {return type->der ? std::make_shared<Tpdf>(type->der, deleter) : nullptr;};
218 S_Tpdf Type::parent() {return type->parent ? std::make_shared<Tpdf>(type->parent, deleter) : nullptr;};
219 S_Type_Info Type::info() {return std::make_shared<Type_Info>(type->info, &type->base, type->value_flags, deleter);};
220 
221 Iffeature::Iffeature(struct lys_iffeature *iffeature, S_Deleter deleter):
223  deleter(deleter)
224 {};
226 std::vector<S_Ext_Instance> Iffeature::ext() LY_NEW_P_LIST(iffeature, ext, ext_size, Ext_Instance);
227 int Iffeature::value() {
229 }
230 
231 Ext_Instance::Ext_Instance(lys_ext_instance *ext_instance, S_Deleter deleter):
232  ext_instance(ext_instance),
233  deleter(deleter)
234 {};
236 std::vector<S_Ext_Instance> Ext_Instance::ext() LY_NEW_P_LIST(ext_instance, ext, ext_size, Ext_Instance);
237 
238 Revision::Revision(lys_revision *revision, S_Deleter deleter):
239  revision(revision),
240  deleter(deleter)
241 {};
243 
244 Schema_Node::Schema_Node(struct lys_node *node, S_Deleter deleter):
245  node(node),
246  deleter(deleter)
247 {};
249 std::vector<S_Ext_Instance> Schema_Node::ext() LY_NEW_P_LIST(node, ext, ext_size, Ext_Instance);
250 S_Module Schema_Node::module() LY_NEW(node, module, Module);
251 S_Schema_Node Schema_Node::parent() LY_NEW(node, parent, Schema_Node);
252 S_Schema_Node Schema_Node::child() LY_NEW(node, child, Schema_Node);
253 S_Schema_Node Schema_Node::next() LY_NEW(node, next, Schema_Node);
254 S_Schema_Node Schema_Node::prev() LY_NEW(node, prev, Schema_Node);
255 std::string Schema_Node::path(int options) {
256  char *path = nullptr;
257 
258  path = lys_path(node, options);
259  if (!path) {
260  return nullptr;
261  }
262 
263  std::string s_path = path;
264  free(path);
265  return s_path;
266 }
267 std::vector<S_Schema_Node> Schema_Node::child_instantiables(int options) {
268  std::vector<S_Schema_Node> s_vector;
269  struct lys_node *iter = NULL;
270 
271  while ((iter = (struct lys_node *)lys_getnext(iter, node, node->module, options))) {
272  s_vector.push_back(std::make_shared<Schema_Node>(iter, deleter));
273  }
274 
275  return s_vector;
276 }
277 S_Set Schema_Node::find_path(const char *path) {
278  struct ly_set *set = lys_find_path(node->module, node, path);
279  if (!set) {
280  check_libyang_error(node->module->ctx);
281  return nullptr;
282  }
283 
284  S_Deleter new_deleter = std::make_shared<Deleter>(set, deleter);
285  return std::make_shared<Set>(set, new_deleter);
286 }
287 
288 S_Set Schema_Node::xpath_atomize(enum lyxp_node_type ctx_node_type, const char *expr, int options) {
289  struct ly_set *set = lys_xpath_atomize(node, ctx_node_type, expr, options);
290  if (!set) {
291  check_libyang_error(node->module->ctx);
292  return nullptr;
293  }
294 
295  return std::make_shared<Set>(set, deleter);
296 }
297 S_Set Schema_Node::xpath_atomize(int options) {
298  struct ly_set *set = lys_node_xpath_atomize(node, options);
299  if (!set) {
300  check_libyang_error(node->module->ctx);
301  return nullptr;
302  }
303 
304  return std::make_shared<Set>(set, deleter);
305 }
306 std::vector<S_Schema_Node> Schema_Node::tree_for() {
307  std::vector<S_Schema_Node> s_vector;
308 
309  struct lys_node *elem = nullptr;
310  LY_TREE_FOR(node, elem) {
311  s_vector.push_back(std::make_shared<Schema_Node>(elem, deleter));
312  }
313 
314  return s_vector;
315 }
316 std::vector<S_Schema_Node> Schema_Node::tree_dfs() {
317  std::vector<S_Schema_Node> s_vector;
318 
319  struct lys_node *elem = nullptr, *next = nullptr;
320  LY_TREE_DFS_BEGIN(node, next, elem) {
321  s_vector.push_back(std::make_shared<Schema_Node>(elem, deleter));
322  LY_TREE_DFS_END(node, next, elem)
323  }
324 
325  return s_vector;
326 }
327 
329 S_When Schema_Node_Container::when() LY_NEW_CASTED(lys_node_container, node, when, When);
330 S_Restr Schema_Node_Container::must() {
331  struct lys_node_container *node_container = (struct lys_node_container *)node;
332  return node_container->must ? std::make_shared<Restr>(node_container->must, deleter) : nullptr;
333 };
335  struct lys_node_container *node_container = (struct lys_node_container *)node;
336  return node_container->tpdf ? std::make_shared<Tpdf>(node_container->tpdf, deleter) : nullptr;
337 };
338 
340 S_When Schema_Node_Choice::when() LY_NEW_CASTED(lys_node_choice, node, when, When);
341 S_Schema_Node Schema_Node_Choice::dflt() {
342  struct lys_node_choice *node_choice = (struct lys_node_choice *)node;
343  return node_choice->dflt ? std::make_shared<Schema_Node>(node_choice->dflt, deleter) : nullptr;
344 };
345 
347 S_When Schema_Node_Leaf::when() LY_NEW_CASTED(lys_node_leaf, node, when, When);
348 S_Type Schema_Node_Leaf::type() {return std::make_shared<Type>(&((struct lys_node_leaf *)node)->type, deleter);}
349 S_Schema_Node_List Schema_Node_Leaf::is_key() {
350  uint8_t pos;
351 
352  auto list = lys_is_key((struct lys_node_leaf *)node, &pos);
353  return list ? std::make_shared<Schema_Node_List>((struct lys_node *) list, deleter) : nullptr;
354 }
355 
357 S_When Schema_Node_Leaflist::when() LY_NEW_CASTED(lys_node_leaflist, node, when, When);
358 std::vector<std::string> Schema_Node_Leaflist::dflt() {
359  struct lys_node_leaflist *node_leaflist = (struct lys_node_leaflist *)node;
360  LY_NEW_STRING_LIST(node_leaflist, dflt, dflt_size);
361 }
362 std::vector<S_Restr> Schema_Node_Leaflist::must() LY_NEW_LIST_CASTED(lys_node_leaflist, node, must, must_size, Restr);
363 S_Type Schema_Node_Leaflist::type() {return std::make_shared<Type>(&((struct lys_node_leaflist *)node)->type, deleter);}
364 
366 S_When Schema_Node_List::when() LY_NEW_CASTED(lys_node_list, node, when, When);
367 std::vector<S_Restr> Schema_Node_List::must() LY_NEW_LIST_CASTED(lys_node_list, node, must, must_size, Restr);
368 std::vector<S_Tpdf> Schema_Node_List::tpdf() LY_NEW_LIST_CASTED(lys_node_list, node, tpdf, tpdf_size, Tpdf);
369 std::vector<S_Schema_Node_Leaf> Schema_Node_List::keys() {
370  auto list = (struct lys_node_list *) node;
371 
372  std::vector<S_Schema_Node_Leaf> s_vector;
373 
374  for (uint8_t i = 0; i < list->keys_size; i++) {
375  s_vector.push_back(std::make_shared<Schema_Node_Leaf>((struct lys_node *) list->keys[i], deleter));
376  }
377 
378  return s_vector;
379 }
380 std::vector<S_Unique> Schema_Node_List::unique() LY_NEW_LIST_CASTED(lys_node_list, node, unique, unique_size, Unique);
381 
383 S_When Schema_Node_Anydata::when() LY_NEW_CASTED(lys_node_anydata, node, when, When);
384 std::vector<S_Restr> Schema_Node_Anydata::must() LY_NEW_LIST_CASTED(lys_node_anydata, node, must, must_size, Restr);
385 
387 S_When Schema_Node_Uses::when() LY_NEW_CASTED(lys_node_uses, node, when, When);
388 std::vector<S_Refine> Schema_Node_Uses::refine() LY_NEW_LIST_CASTED(lys_node_uses, node, refine, refine_size, Refine);
389 std::vector<S_Schema_Node_Augment> Schema_Node_Uses::augment() {
390  auto uses = (struct lys_node_uses *) node;
391 
392  std::vector<S_Schema_Node_Augment> s_vector;
393 
394  for (uint8_t i = 0; i < uses->augment_size; i++) {
395  s_vector.push_back(std::make_shared<Schema_Node_Augment>((struct lys_node *) &uses->augment[i], deleter));
396  }
397 
398  return s_vector;
399 }
400 S_Schema_Node_Grp Schema_Node_Uses::grp() {
401  auto uses = (struct lys_node_uses *) node;
402  return uses->grp ? std::make_shared<Schema_Node_Grp>(node, deleter) : nullptr;
403 };
404 
406 std::vector<S_Tpdf> Schema_Node_Grp::tpdf() LY_NEW_LIST_CASTED(lys_node_grp, node, tpdf, tpdf_size, Tpdf);
407 
409 S_When Schema_Node_Case::when() LY_NEW_CASTED(lys_node_case, node, when, When);
410 
412 std::vector<S_Tpdf> Schema_Node_Inout::tpdf() LY_NEW_LIST_CASTED(lys_node_inout, node, tpdf, tpdf_size, Tpdf);
413 std::vector<S_Restr> Schema_Node_Inout::must() LY_NEW_LIST_CASTED(lys_node_inout, node, must, must_size, Restr);
414 
416 std::vector<S_Tpdf> Schema_Node_Notif::tpdf() LY_NEW_LIST_CASTED(lys_node_notif, node, tpdf, tpdf_size, Tpdf);
417 std::vector<S_Restr> Schema_Node_Notif::must() LY_NEW_LIST_CASTED(lys_node_notif, node, must, must_size, Restr);
418 
420 std::vector<S_Tpdf> Schema_Node_Rpc_Action::tpdf() LY_NEW_LIST_CASTED(lys_node_rpc_action, node, tpdf, tpdf_size, Tpdf);
421 
423 S_When Schema_Node_Augment::when() LY_NEW_CASTED(lys_node_augment, node, when, When);
424 
425 When::When(struct lys_when *when, S_Deleter deleter):
426  when(when),
427  deleter(deleter)
428 {};
430 std::vector<S_Ext_Instance> When::ext() LY_NEW_P_LIST(when, ext, ext_size, Ext_Instance);
431 
432 Substmt::Substmt(struct lyext_substmt *substmt, S_Deleter deleter):
433  substmt(substmt),
434  deleter(deleter)
435 {};
437 
438 Ext::Ext(struct lys_ext *ext, S_Deleter deleter):
439  ext(ext),
440  deleter(deleter)
441 {};
443 std::vector<S_Ext_Instance> Ext::ext_instance() LY_NEW_P_LIST(ext, ext, ext_size, Ext_Instance);
444 S_Module Ext::module() LY_NEW(ext, module, Module);
445 
446 Refine_Mod_List::Refine_Mod_List(struct lys_refine_mod_list *list, S_Deleter deleter):
447  list(list),
448  deleter(deleter)
449 {};
451 
452 Refine_Mod::Refine_Mod(union lys_refine_mod mod, uint16_t target_type, S_Deleter deleter):
453  mod(mod),
454  target_type(target_type),
455  deleter(deleter)
456 {};
458 //TODO check which type's to accept
459 S_Refine_Mod_List Refine_Mod::list() {return target_type != LYS_CONTAINER ? std::make_shared<Refine_Mod_List>(&mod.list, deleter) : nullptr;};
460 
461 Refine::Refine(struct lys_refine *refine, S_Deleter deleter):
462  refine(refine),
463  deleter(deleter)
464 {};
466 std::vector<S_Ext_Instance> Refine::ext() LY_NEW_P_LIST(refine, ext, ext_size, Ext_Instance);
467 S_Module Refine::module() LY_NEW(refine, module, Module);
468 std::vector<S_Restr> Refine::must() LY_NEW_LIST(refine, must, must_size, Restr);
469 S_Refine_Mod Refine::mod() {return std::make_shared<Refine_Mod>(refine->mod, refine->target_type, deleter);};
470 
471 Deviate::Deviate(struct lys_deviate *deviate, S_Deleter deleter):
472  deviate(deviate),
473  deleter(deleter)
474 {};
476 std::vector<S_Ext_Instance> Deviate::ext() LY_NEW_P_LIST(deviate, ext, ext_size, Ext_Instance);
477 S_Restr Deviate::must() {return deviate->must ? std::make_shared<Restr>(deviate->must, deleter) : nullptr;};
478 S_Unique Deviate::unique() {return deviate->unique ? std::make_shared<Unique>(deviate->unique, deleter) : nullptr;};
479 S_Type Deviate::type() {return deviate->type ? std::make_shared<Type>(deviate->type, deleter) : nullptr;}
480 
481 Deviation::Deviation(struct lys_deviation *deviation, S_Deleter deleter):
482  deviation(deviation),
483  deleter(deleter)
484 {};
486 S_Schema_Node Deviation::orig_node() LY_NEW(deviation, orig_node, Schema_Node);
487 std::vector<S_Deviate> Deviation::deviate() LY_NEW_LIST(deviation, deviate, deviate_size, Deviate);
488 std::vector<S_Ext_Instance> Deviation::ext() LY_NEW_P_LIST(deviation, ext, ext_size, Ext_Instance);
489 
490 Import::Import(struct lys_import *import, S_Deleter deleter):
491  import(import),
492  deleter(deleter)
493 {};
495 
496 Include::Include(struct lys_include *include, S_Deleter deleter):
497  include(include),
498  deleter(deleter)
499 {}
501 
502 Tpdf::Tpdf(struct lys_tpdf *tpdf, S_Deleter deleter):
503  tpdf(tpdf),
504  deleter(deleter)
505 {}
507 S_Type Tpdf::type() {return std::make_shared<Type>(&tpdf->type, deleter);}
508 
509 Unique::Unique(struct lys_unique *unique, S_Deleter deleter):
510  unique(unique),
511  deleter(deleter)
512 {};
514 
515 Feature::Feature(struct lys_feature *feature, S_Deleter deleter):
516  feature(feature),
517  deleter(deleter)
518 {};
520 
521 Restr::Restr(struct lys_restr *restr, S_Deleter deleter):
522  restr(restr),
523  deleter(deleter)
524 {};
526 
527 Ident::Ident(struct lys_ident *ident, S_Deleter deleter):
528  ident(ident),
529  deleter(deleter)
530 {};
532 std::vector<S_Ident> Ident::base() LY_NEW_P_LIST(ident, base, base_size, Ident);
533 
534 }
libyang::Type::~Type
~Type()
Definition: Tree_Schema.cpp:215
LYS_OUTFORMAT
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
Definition: tree_schema.h:196
lys_node::child
struct lys_node * child
Definition: tree_schema.h:1229
lys_type_info::bits
struct lys_type_info_bits bits
Definition: tree_schema.h:959
LY_TYPE_BINARY
@ LY_TYPE_BINARY
Definition: tree_schema.h:786
libyang::Schema_Node_List::when
S_When when()
Definition: Tree_Schema.cpp:366
libyang::Submodule::Submodule
Submodule(struct lys_submodule *submodule, S_Deleter deleter)
Definition: Tree_Schema.cpp:38
libyang::Schema_Node::find_path
S_Set find_path(const char *path)
Definition: Tree_Schema.cpp:277
libyang::Deviation::Deviation
Deviation(struct lys_deviation *deviation, S_Deleter deleter)
Definition: Tree_Schema.cpp:481
libyang::Type::Type
Type(struct lys_type *type, S_Deleter deleter)
Definition: Tree_Schema.cpp:211
lys_node_list::unique_size
uint8_t unique_size
Definition: tree_schema.h:1464
lys_node_xpath_atomize
struct ly_set * lys_node_xpath_atomize(const struct lys_node *node, int options)
Call lys_xpath_atomize() on all the when and must expressions of the node. This node must be a descen...
lys_type_info_enums
Container for information about enumeration types (LY_TYPE_ENUM), used in lys_type_info.
Definition: tree_schema.h:879
lys_type
YANG type structure providing information from the schema.
Definition: tree_schema.h:973
lys_features_disable
int lys_features_disable(const struct lys_module *module, const char *feature)
Disable specified feature in the module. If it causes some dependant features to be disabled,...
libyang::Type_Info_Bits
Definition: Tree_Schema.hpp:236
libyang::Type_Info_Bits::bit
std::vector< S_Type_Bit > bit()
Definition: Tree_Schema.cpp:121
libyang::Type_Info::str
S_Type_Info_Str str()
Definition: Tree_Schema.cpp:208
lys_deviate
YANG deviate statement structure, see RFC 6020 sec. 7.18.3.2
Definition: tree_schema.h:1916
LY_TYPE_INST
@ LY_TYPE_INST
Definition: tree_schema.h:793
libyang::Type_Info_Str::~Type_Info_Str
~Type_Info_Str()
Definition: Tree_Schema.cpp:176
lys_restr
YANG validity restriction (must, length, etc.) structure providing information from the schema.
Definition: tree_schema.h:2050
libyang::Ident::base
std::vector< S_Ident > base()
Definition: Tree_Schema.cpp:532
lys_node_choice::dflt
struct lys_node * dflt
Definition: tree_schema.h:1331
libyang::Schema_Node_Uses
Definition: Tree_Schema.hpp:831
libyang::Iffeature::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:226
LY_TYPE_UINT64
@ LY_TYPE_UINT64
Definition: tree_schema.h:804
libyang::Deviate::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:476
lys_node_list::unique
struct lys_unique * unique
Definition: tree_schema.h:1490
libyang::Module::Module
Module(struct lys_module *module, S_Deleter deleter)
Definition: Tree_Schema.cpp:31
libyang::Schema_Node
Definition: Tree_Schema.hpp:527
libyang::When::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:430
libyang::Schema_Node_Grp::tpdf
std::vector< S_Tpdf > tpdf()
Definition: Tree_Schema.cpp:406
lys_node::ext
struct lys_ext_instance ** ext
Definition: tree_schema.h:1223
libyang::Type_Info_Ident
Definition: Tree_Schema.hpp:316
libyang::Import::~Import
~Import()
Definition: Tree_Schema.cpp:494
libyang::Module::feature_state
int feature_state(const char *feature)
Definition: Tree_Schema.cpp:94
libyang::Ident::Ident
Ident(struct lys_ident *ident, S_Deleter deleter)
Definition: Tree_Schema.cpp:527
lys_deviation
YANG deviation statement structure, see RFC 6020 sec. 7.18.3
Definition: tree_schema.h:1943
libyang::Restr::Restr
Restr(struct lys_restr *restr, S_Deleter deleter)
Definition: Tree_Schema.cpp:521
lys_node_rpc_action
Schema rpc/action node structure.
Definition: tree_schema.h:1775
LY_TYPE_INT8
@ LY_TYPE_INT8
Definition: tree_schema.h:797
libyang::Type_Bit::~Type_Bit
~Type_Bit()
Definition: Tree_Schema.cpp:112
lys_type::base
LY_DATA_TYPE _PACKED base
Definition: tree_schema.h:974
lys_refine::target_type
uint16_t target_type
Definition: tree_schema.h:1884
libyang::Unique::Unique
Unique(struct lys_unique *unique, S_Deleter deleter)
Definition: Tree_Schema.cpp:509
LYS_CONTAINER
@ LYS_CONTAINER
Definition: tree_schema.h:231
lys_refine::mod
union lys_refine_mod mod
Definition: tree_schema.h:1899
libyang::Ext
Definition: Tree_Schema.hpp:1063
libyang::Substmt::~Substmt
~Substmt()
Definition: Tree_Schema.cpp:436
lys_module
Main schema node structure representing YANG module.
Definition: tree_schema.h:666
libyang::Ident
Definition: Tree_Schema.hpp:1442
libyang::Schema_Node::~Schema_Node
virtual ~Schema_Node()
Definition: Tree_Schema.cpp:248
lys_type_info::uni
struct lys_type_info_union uni
Definition: tree_schema.h:967
libyang::Type_Info_Inst
Definition: Tree_Schema.hpp:332
lys_type_bit
Single bit value specification for lys_type_info_bits.
Definition: tree_schema.h:820
lys_node_leaflist::dflt
const char ** dflt
Definition: tree_schema.h:1438
libyang
Definition: Libyang.hpp:30
lys_include
YANG include structure used to reference submodules.
Definition: tree_schema.h:1972
libyang::Schema_Node::xpath_atomize
S_Set xpath_atomize(enum lyxp_node_type ctx_node_type, const char *expr, int options)
Definition: Tree_Schema.cpp:288
lys_when
YANG when restriction, see RFC 6020 sec. 7.19.5
Definition: tree_schema.h:2066
Libyang.hpp
Class implementation for libyang C header libyang.h.
lyxp_node_type
lyxp_node_type
Types of context nodes, LYXP_NODE_ROOT_CONFIG used only in when or must conditions.
Definition: tree_schema.h:2317
libyang::Type::der
S_Tpdf der()
Definition: Tree_Schema.cpp:217
libyang::Type::parent
S_Tpdf parent()
Definition: Tree_Schema.cpp:218
libyang::Submodule::~Submodule
~Submodule()
Definition: Tree_Schema.cpp:97
libyang::Type_Info_Num::~Type_Info_Num
~Type_Info_Num()
Definition: Tree_Schema.cpp:162
lys_type_info_bits
Container for information about bits types (LY_TYPE_BINARY), used in lys_type_info.
Definition: tree_schema.h:839
lys_module::ctx
struct ly_ctx * ctx
Definition: tree_schema.h:667
lyext_substmt
Description of the extension instance substatement.
Definition: tree_schema.h:435
libyang::Type_Info_Dec64::~Type_Info_Dec64
~Type_Info_Dec64()
Definition: Tree_Schema.cpp:127
lys_iffeature_value
int lys_iffeature_value(const struct lys_iffeature *iff)
Learn how the if-feature statement currently evaluates.
lys_type_info_binary
Definition: tree_schema.h:812
libyang::Schema_Node::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:249
libyang::Revision
Definition: Tree_Schema.hpp:1288
libyang::Type_Info_Binary::~Type_Info_Binary
~Type_Info_Binary()
Definition: Tree_Schema.cpp:105
lys_type_info_binary::length
struct lys_restr * length
Definition: tree_schema.h:813
libyang::Tpdf::~Tpdf
~Tpdf()
Definition: Tree_Schema.cpp:506
libyang::Iffeature
Definition: Tree_Schema.hpp:471
libyang::Ext::~Ext
~Ext()
Definition: Tree_Schema.cpp:442
libyang::Type_Enum::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:135
libyang::Include::~Include
~Include()
Definition: Tree_Schema.cpp:500
lys_features_state
int lys_features_state(const struct lys_module *module, const char *feature)
Get the current status of the specified feature in the module. Even if the feature is enabled but som...
libyang::Refine_Mod_List::~Refine_Mod_List
~Refine_Mod_List()
Definition: Tree_Schema.cpp:450
libyang::Schema_Node_Grp::~Schema_Node_Grp
~Schema_Node_Grp()
Definition: Tree_Schema.cpp:405
libyang::Schema_Node::tree_dfs
std::vector< S_Schema_Node > tree_dfs()
Definition: Tree_Schema.cpp:316
libyang::Type_Info::ident
S_Type_Info_Ident ident()
Definition: Tree_Schema.cpp:198
lys_unique
YANG list's unique statement structure, see RFC 6020 sec. 7.8.3
Definition: tree_schema.h:2020
libyang::Restr
Definition: Tree_Schema.hpp:1394
lys_node_case
Schema case node structure.
Definition: tree_schema.h:1645
libyang::Deviate::type
S_Type type()
Definition: Tree_Schema.cpp:479
libyang::Tpdf::Tpdf
Tpdf(struct lys_tpdf *tpdf, S_Deleter deleter)
Definition: Tree_Schema.cpp:502
libyang::Schema_Node_Augment::when
S_When when()
Definition: Tree_Schema.cpp:423
libyang::Schema_Node::Schema_Node
Schema_Node(lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.cpp:244
libyang::Schema_Node_Inout::tpdf
std::vector< S_Tpdf > tpdf()
Definition: Tree_Schema.cpp:412
libyang::Submodule
classes for wrapping lys_submodule.
Definition: Tree_Schema.hpp:126
lys_revision
YANG revision statement for (sub)modules.
Definition: tree_schema.h:1984
libyang::Refine_Mod::Refine_Mod
Refine_Mod(union lys_refine_mod mod, uint16_t target_type, S_Deleter deleter)
Definition: Tree_Schema.cpp:452
lys_node::iffeature
struct lys_iffeature * iffeature
Definition: tree_schema.h:1224
libyang::Iffeature::Iffeature
Iffeature(struct lys_iffeature *iffeature, S_Deleter deleter)
Definition: Tree_Schema.cpp:221
lys_refine_mod_list
Container for list modifications in lys_refine_mod.
Definition: tree_schema.h:1858
libyang::Type_Info::uni
S_Type_Info_Union uni()
Definition: Tree_Schema.cpp:209
libyang::Include::Include
Include(struct lys_include *include, S_Deleter deleter)
Definition: Tree_Schema.cpp:496
libyang::Type_Info_Inst::~Type_Info_Inst
~Type_Info_Inst()
Definition: Tree_Schema.cpp:156
libyang::Refine_Mod::list
S_Refine_Mod_List list()
Definition: Tree_Schema.cpp:459
lys_refine_mod
Union to hold target modification in lys_refine.
Definition: tree_schema.h:1866
libyang::Module::print_mem
std::string print_mem(LYS_OUTFORMAT format, int options)
Definition: Tree_Schema.cpp:60
LY_TYPE_LEAFREF
@ LY_TYPE_LEAFREF
Definition: tree_schema.h:794
libyang::Unique
Definition: Tree_Schema.hpp:1344
lys_node::prev
struct lys_node * prev
Definition: tree_schema.h:1234
lys_node_leaf
Schema leaf node structure.
Definition: tree_schema.h:1345
lys_node_leaflist::type
struct lys_type type
Definition: tree_schema.h:1433
libyang::Schema_Node_List::unique
std::vector< S_Unique > unique()
Definition: Tree_Schema.cpp:380
libyang::Type_Info_Num::range
S_Restr range()
Definition: Tree_Schema.cpp:163
libyang::Schema_Node_Uses::grp
S_Schema_Node_Grp grp()
Definition: Tree_Schema.cpp:400
lys_node::ext_size
uint8_t ext_size
Definition: tree_schema.h:1214
lys_node_uses
Schema uses node structure.
Definition: tree_schema.h:1559
libyang::Type_Info_Enums::~Type_Info_Enums
~Type_Info_Enums()
Definition: Tree_Schema.cpp:142
libyang::When
Definition: Tree_Schema.hpp:1420
libyang::Refine::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:466
libyang::Schema_Node_Case::when
S_When when()
Definition: Tree_Schema.cpp:409
libyang::Type_Info::inst
S_Type_Info_Inst inst()
Definition: Tree_Schema.cpp:199
libyang::Schema_Node_Container
Definition: Tree_Schema.hpp:609
lys_print_mem
int lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, const char *target_node, int line_length, int options)
Print schema tree in the specified format into a memory block. It is up to caller to free the returne...
libyang::Type
Definition: Tree_Schema.hpp:448
libyang::Ext_Instance::Ext_Instance
Ext_Instance(lys_ext_instance *ext_instance, S_Deleter deleter)
Definition: Tree_Schema.cpp:231
libyang::Schema_Node_Leaflist
Definition: Tree_Schema.hpp:707
libyang::Schema_Node::child_instantiables
std::vector< S_Schema_Node > child_instantiables(int options)
Definition: Tree_Schema.cpp:267
libyang::Type_Info_Binary
Definition: Tree_Schema.hpp:192
lys_type_enum
Single enumeration value specification for lys_type_info_enums.
Definition: tree_schema.h:860
libyang::Type_Info_Lref::Type_Info_Lref
Type_Info_Lref(struct lys_type_info_lref *info_lref, S_Deleter deleter)
Definition: Tree_Schema.cpp:165
libyang::Restr::~Restr
~Restr()
Definition: Tree_Schema.cpp:525
libyang::Type_Info::lref
S_Type_Info_Lref lref()
Definition: Tree_Schema.cpp:207
libyang::Schema_Node_Leaflist::~Schema_Node_Leaflist
~Schema_Node_Leaflist()
Definition: Tree_Schema.cpp:356
libyang::Type_Info_Bits::~Type_Info_Bits
~Type_Info_Bits()
Definition: Tree_Schema.cpp:120
lys_deviate::type
struct lys_type * type
Definition: tree_schema.h:1933
libyang::Import
Definition: Tree_Schema.hpp:1238
libyang::Module::feature_disable
int feature_disable(const char *feature)
Definition: Tree_Schema.cpp:91
lys_node::iffeature_size
uint8_t iffeature_size
Definition: tree_schema.h:1215
libyang::Type::info
S_Type_Info info()
Definition: Tree_Schema.cpp:219
libyang::Schema_Node_Choice::when
S_When when()
Definition: Tree_Schema.cpp:340
lys_type_info::enums
struct lys_type_info_enums enums
Definition: tree_schema.h:961
libyang::Schema_Node_Leaf
Definition: Tree_Schema.hpp:671
lys_type::parent
struct lys_tpdf * parent
Definition: tree_schema.h:980
LY_TYPE_BITS
@ LY_TYPE_BITS
Definition: tree_schema.h:787
lys_type_info::lref
struct lys_type_info_lref lref
Definition: tree_schema.h:965
libyang::Type_Info_Enums
Definition: Tree_Schema.hpp:300
lys_type_info::dec64
struct lys_type_info_dec64 dec64
Definition: tree_schema.h:960
lys_node_augment
YANG augment structure (covering both possibilities - uses's substatement as well as (sub)module's su...
Definition: tree_schema.h:1823
libyang::Schema_Node::tree_for
std::vector< S_Schema_Node > tree_for()
Definition: Tree_Schema.cpp:306
libyang::Substmt
Definition: Tree_Schema.hpp:1046
lys_node_container
Schema container node structure.
Definition: tree_schema.h:1255
lys_node_grp
Schema grouping node structure.
Definition: tree_schema.h:1606
lys_type_info_dec64::range
struct lys_restr * range
Definition: tree_schema.h:848
libyang::Deviate::unique
S_Unique unique()
Definition: Tree_Schema.cpp:478
libyang::Type_Bit::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:113
libyang::Tpdf
Definition: Tree_Schema.hpp:1308
lys_node_container::must
struct lys_restr * must
Definition: tree_schema.h:1289
libyang::Schema_Node_List::~Schema_Node_List
~Schema_Node_List()
Definition: Tree_Schema.cpp:365
libyang::Type_Info_Ident::~Type_Info_Ident
~Type_Info_Ident()
Definition: Tree_Schema.cpp:149
lys_node::module
struct lys_module * module
Definition: tree_schema.h:1225
lys_node::next
struct lys_node * next
Definition: tree_schema.h:1233
lys_node::flags
uint16_t flags
Definition: tree_schema.h:1213
libyang::Ext::Ext
Ext(struct lys_ext *ext, S_Deleter deleter)
Definition: Tree_Schema.cpp:438
libyang::Refine::Refine
Refine(struct lys_refine *refine, S_Deleter deleter)
Definition: Tree_Schema.cpp:461
libyang::Schema_Node_Choice
Definition: Tree_Schema.hpp:642
libyang::Type::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:216
libyang::Schema_Node_Leaf::~Schema_Node_Leaf
~Schema_Node_Leaf()
Definition: Tree_Schema.cpp:346
lys_type_info::inst
struct lys_type_info_inst inst
Definition: tree_schema.h:963
libyang::Unique::~Unique
~Unique()
Definition: Tree_Schema.cpp:513
LY_TYPE_UNION
@ LY_TYPE_UNION
Definition: tree_schema.h:796
libyang::Type_Info::num
S_Type_Info_Num num()
Definition: Tree_Schema.cpp:200
LY_TREE_DFS_BEGIN
#define LY_TREE_DFS_BEGIN(START, NEXT, ELEM)
Macro to iterate via all elements in a tree. This is the opening part to the LY_TREE_DFS_END - they a...
Definition: tree_schema.h:90
Tree_Schema.hpp
Class implementation for libyang C header tree_schema.h.
libyang::Type_Enum
Definition: Tree_Schema.hpp:270
libyang::Type_Info::binary
S_Type_Info_Binary binary()
Definition: Tree_Schema.cpp:194
libyang::Schema_Node_Uses::when
S_When when()
Definition: Tree_Schema.cpp:387
libyang::Submodule::rev
S_Revision rev()
Definition: Tree_Schema.cpp:98
lys_find_path
struct ly_set * lys_find_path(const struct lys_module *cur_module, const struct lys_node *cur_node, const char *path)
Search for schema nodes matching the provided path.
libyang::Deviation::orig_node
S_Schema_Node orig_node()
Definition: Tree_Schema.cpp:486
libyang::Type_Info
Definition: Tree_Schema.hpp:414
lys_feature
YANG feature definition structure.
Definition: tree_schema.h:2029
libyang::Schema_Node_Anydata
Definition: Tree_Schema.hpp:800
libyang::Schema_Node_Container::when
S_When when()
Definition: Tree_Schema.cpp:329
lys_node::parent
struct lys_node * parent
Definition: tree_schema.h:1228
lys_tpdf
YANG typedef structure providing information from the schema.
Definition: tree_schema.h:1995
libyang::Schema_Node_Container::ptdf
S_Tpdf ptdf()
Definition: Tree_Schema.cpp:334
lys_type_info_ident
Container for information about identity types (LY_TYPE_IDENT), used in lys_type_info.
Definition: tree_schema.h:887
libyang::Type_Info_Union::~Type_Info_Union
~Type_Info_Union()
Definition: Tree_Schema.cpp:184
libyang::Schema_Node_Notif
Definition: Tree_Schema.hpp:955
LY_DATA_TYPE
LY_DATA_TYPE
YANG built-in types.
Definition: tree_schema.h:784
libyang::Type_Info::dec64
S_Type_Info_Dec64 dec64()
Definition: Tree_Schema.cpp:196
lys_node_container::tpdf
struct lys_tpdf * tpdf
Definition: tree_schema.h:1290
lys_node_container::when
struct lys_when * when
Definition: tree_schema.h:1288
lys_node_leaflist::must_size
uint8_t must_size
Definition: tree_schema.h:1407
libyang::Schema_Node_Leaf::is_key
S_Schema_Node_List is_key()
Definition: Tree_Schema.cpp:349
libyang::Feature::~Feature
~Feature()
Definition: Tree_Schema.cpp:519
libyang::Schema_Node_Inout
Definition: Tree_Schema.hpp:922
libyang::Refine_Mod_List
Definition: Tree_Schema.hpp:1091
lys_ident
Structure to hold information about identity, see RFC 6020 sec. 7.16
Definition: tree_schema.h:2080
libyang::Schema_Node_Container::~Schema_Node_Container
~Schema_Node_Container()
Definition: Tree_Schema.cpp:328
lys_node_choice
Schema choice node structure.
Definition: tree_schema.h:1303
lys_type::value_flags
uint8_t value_flags
Definition: tree_schema.h:975
LY_TYPE_ENUM
@ LY_TYPE_ENUM
Definition: tree_schema.h:791
libyang::Type_Info_Str::Type_Info_Str
Type_Info_Str(struct lys_type_info_str *info_str, S_Deleter deleter)
Definition: Tree_Schema.cpp:172
libyang::Type_Enum::~Type_Enum
~Type_Enum()
Definition: Tree_Schema.cpp:134
lys_submodule
Submodule schema node structure that can be included into a YANG module.
Definition: tree_schema.h:729
libyang::Type_Info_Dec64
Definition: Tree_Schema.hpp:252
libyang::Type_Info::bits
S_Type_Info_Bits bits()
Definition: Tree_Schema.cpp:195
lys_node::ref
const char * ref
Definition: tree_schema.h:1212
lys_is_key
const struct lys_node_list * lys_is_key(const struct lys_node_leaf *node, uint8_t *index)
Check if the schema leaf node is used as a key for a list.
libyang::Deviate::~Deviate
~Deviate()
Definition: Tree_Schema.cpp:475
libyang::When::~When
~When()
Definition: Tree_Schema.cpp:429
lys_node
Common structure representing single YANG data statement describing.
Definition: tree_schema.h:1209
lys_type_info_lref
Container for information about leafref types (LY_TYPE_LEAFREF), used in lys_type_info.
Definition: tree_schema.h:914
lys_import
YANG import structure used to reference other schemas (modules).
Definition: tree_schema.h:1959
LY_TYPE_IDENT
@ LY_TYPE_IDENT
Definition: tree_schema.h:792
libyang::Deviate
Definition: Tree_Schema.hpp:1166
libyang::Schema_Node_Rpc_Action
Definition: Tree_Schema.hpp:988
LY_TREE_FOR
#define LY_TREE_FOR(START, ELEM)
Macro to iterate via all sibling elements without affecting the list itself.
Definition: tree_schema.h:40
libyang::Schema_Node_Notif::tpdf
std::vector< S_Tpdf > tpdf()
Definition: Tree_Schema.cpp:416
lys_type_info_str::patterns
struct lys_restr * patterns
Definition: tree_schema.h:930
libyang::Schema_Node_Leaflist::must
std::vector< S_Restr > must()
Definition: Tree_Schema.cpp:362
libyang::Deviation
Definition: Tree_Schema.hpp:1210
libyang::Module
classes for wrapping lys_module.
Definition: Tree_Schema.hpp:45
lys_refine_mod::list
struct lys_refine_mod_list list
Definition: tree_schema.h:1868
libyang::Type_Bit
Definition: Tree_Schema.hpp:206
tree_schema.h
libyang representation of data model trees.
LY_TREE_DFS_END
#define LY_TREE_DFS_END(START, NEXT, ELEM)
Definition: tree_schema.h:122
lys_type_info_dec64
Container for information about decimal64 types (LY_TYPE_DEC64), used in lys_type_info.
Definition: tree_schema.h:847
lys_ext
YANG extension definition.
Definition: tree_schema.h:444
lys_refine
YANG uses's refine substatement structure, see RFC 6020 sec. 7.12.2
Definition: tree_schema.h:1875
libyang::Type_Info_Union::types
std::vector< S_Type > types()
Definition: Tree_Schema.cpp:185
lys_node_anydata
Schema anydata (and anyxml) node structure.
Definition: tree_schema.h:1511
libyang::Refine
Definition: Tree_Schema.hpp:1124
libyang::Refine_Mod::~Refine_Mod
~Refine_Mod()
Definition: Tree_Schema.cpp:457
libyang::Type_Enum::Type_Enum
Type_Enum(struct lys_type_enum *info_enum, S_Deleter deleter)
Definition: Tree_Schema.cpp:130
LY_TYPE_DEC64
@ LY_TYPE_DEC64
Definition: tree_schema.h:789
libyang::Schema_Node_Case
Definition: Tree_Schema.hpp:895
lys_type_info_num
Container for information about integer types, used in lys_type_info.
Definition: tree_schema.h:906
libyang::Ext::ext_instance
std::vector< S_Ext_Instance > ext_instance()
Definition: Tree_Schema.cpp:443
libyang::Schema_Node_Anydata::when
S_When when()
Definition: Tree_Schema.cpp:383
libyang::Module::~Module
~Module()
Definition: Tree_Schema.cpp:35
lys_type_info::num
struct lys_type_info_num num
Definition: tree_schema.h:964
lys_type_info_union
Container for information about union types (LY_TYPE_UNION), used in lys_type_info.
Definition: tree_schema.h:947
libyang::Ext_Instance
Definition: Tree_Schema.hpp:491
libyang::Type_Info::~Type_Info
~Type_Info()
Definition: Tree_Schema.cpp:193
lys_type_info::str
struct lys_type_info_str str
Definition: tree_schema.h:966
libyang::Type_Bit::Type_Bit
Type_Bit(struct lys_type_bit *info_bit, S_Deleter deleter)
Definition: Tree_Schema.cpp:108
lys_type_info::ident
struct lys_type_info_ident ident
Definition: tree_schema.h:962
libyang::Deviate::Deviate
Deviate(struct lys_deviate *deviate, S_Deleter deleter)
Definition: Tree_Schema.cpp:471
libyang::Ext_Instance::~Ext_Instance
~Ext_Instance()
Definition: Tree_Schema.cpp:235
lys_iffeature
Compiled if-feature expression structure.
Definition: tree_schema.h:1070
LY_TYPE_STRING
@ LY_TYPE_STRING
Definition: tree_schema.h:795
lys_path
char * lys_path(const struct lys_node *node, int options)
Build schema path (usable as path, see howtoxpath) of the schema node.
lys_node_leaflist::dflt_size
uint8_t dflt_size
Definition: tree_schema.h:1406
libyang::Type_Info_Enums::enm
std::vector< S_Type_Enum > enm()
Definition: Tree_Schema.cpp:143
libyang::Schema_Node_Leaflist::when
S_When when()
Definition: Tree_Schema.cpp:357
lys_node_leaflist
Schema leaf-list node structure.
Definition: tree_schema.h:1396
lys_type_info_lref::target
struct lys_node_leaf * target
Definition: tree_schema.h:917
libyang::Schema_Node_Augment
Definition: Tree_Schema.hpp:1017
libyang::Type_Info_Lref::~Type_Info_Lref
~Type_Info_Lref()
Definition: Tree_Schema.cpp:169
libyang::Iffeature::~Iffeature
~Iffeature()
Definition: Tree_Schema.cpp:225
libyang::Type_Info_Binary::length
S_Restr length()
Definition: Tree_Schema.cpp:106
lys_ext_instance
Generic extension instance structure.
Definition: tree_schema.h:464
lys_type_info_str
Container for information about string types (LY_TYPE_STRING), used in lys_type_info.
Definition: tree_schema.h:927
libyang::Schema_Node_Rpc_Action::tpdf
std::vector< S_Tpdf > tpdf()
Definition: Tree_Schema.cpp:420
libyang::Type_Info_Num::Type_Info_Num
Type_Info_Num(struct lys_type_info_num *info_num, S_Deleter deleter)
Definition: Tree_Schema.cpp:158
lys_xpath_atomize
struct ly_set * lys_xpath_atomize(const struct lys_node *ctx_node, enum lyxp_node_type ctx_node_type, const char *expr, int options)
Get all the partial XPath nodes (atoms) that are required for expr to be evaluated.
lys_type_info
Union for holding type-specific information in lys_type.
Definition: tree_schema.h:957
lys_type_info::binary
struct lys_type_info_binary binary
Definition: tree_schema.h:958
libyang::Refine::~Refine
~Refine()
Definition: Tree_Schema.cpp:465
libyang::Schema_Node_Leaf::when
S_When when()
Definition: Tree_Schema.cpp:347
libyang::Type_Info_Str::length
S_Restr length()
Definition: Tree_Schema.cpp:177
libyang::Deviate::must
S_Restr must()
Definition: Tree_Schema.cpp:477
libyang::Deviation::~Deviation
~Deviation()
Definition: Tree_Schema.cpp:485
lys_type_info_inst
Container for information about instance-identifier types (LY_TYPE_INST), used in lys_type_info.
Definition: tree_schema.h:895
libyang::Ident::~Ident
~Ident()
Definition: Tree_Schema.cpp:531
libyang::Type_Info_Lref::target
S_Schema_Node_Leaf target()
Definition: Tree_Schema.cpp:170
lys_node_notif
Schema notification node structure.
Definition: tree_schema.h:1728
lys_node_uses::refine
struct lys_refine * refine
Definition: tree_schema.h:1590
libyang::Type_Info_Ident::ref
std::vector< S_Ident > ref()
Definition: Tree_Schema.cpp:150
libyang::Module::feature_enable
int feature_enable(const char *feature)
Definition: Tree_Schema.cpp:88
libyang::Type_Info_Dec64::range
S_Restr range()
Definition: Tree_Schema.cpp:128
lys_features_enable
int lys_features_enable(const struct lys_module *module, const char *feature)
Enable specified feature in the module. In case its if-feature evaluates to false,...
libyang::Module::rev
S_Revision rev()
Definition: Tree_Schema.cpp:36
libyang::Type_Info_Str::patterns
S_Restr patterns()
Definition: Tree_Schema.cpp:178
libyang::Revision::~Revision
~Revision()
Definition: Tree_Schema.cpp:242
lys_type::info
union lys_type_info info
Definition: tree_schema.h:982
libyang::Module::data_instantiables
std::vector< S_Schema_Node > data_instantiables(int options)
Definition: Tree_Schema.cpp:50
libyang::Schema_Node::path
std::string path(int options=0)
Definition: Tree_Schema.cpp:255
libyang::Ext_Instance::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.cpp:236
libyang::Schema_Node_Choice::~Schema_Node_Choice
~Schema_Node_Choice()
Definition: Tree_Schema.cpp:339
lys_getnext
const struct lys_node * lys_getnext(const struct lys_node *last, const struct lys_node *parent, const struct lys_module *module, int options)
Get next schema tree (sibling) node element that can be instantiated in a data tree....
libyang::Schema_Node_List
Definition: Tree_Schema.hpp:751
libyang::Schema_Node::next
virtual S_Schema_Node next()
Definition: Tree_Schema.cpp:253
lys_node_inout
RPC input and output node structure.
Definition: tree_schema.h:1690
libyang::Feature::Feature
Feature(struct lys_feature *feature, S_Deleter)
Definition: Tree_Schema.cpp:515
lys_node_list
Schema list node structure.
Definition: tree_schema.h:1452
libyang::Type_Info::enums
S_Type_Info_Enums enums()
Definition: Tree_Schema.cpp:197
libyang::Tpdf::type
S_Type type()
Definition: Tree_Schema.cpp:507
libyang::Type_Info_Union::Type_Info_Union
Type_Info_Union(struct lys_type_info_union *info_union, S_Deleter deleter)
Definition: Tree_Schema.cpp:180