libyang  1.0.101
YANG data modeling language library
Tree_Schema.hpp
Go to the documentation of this file.
1 
15 #ifndef TREE_SCHEMA_H
16 #define TREE_SCHEMA_H
17 
18 #include <iostream>
19 #include <memory>
20 #include <exception>
21 #include <vector>
22 
23 #include "Internal.hpp"
24 #include "Libyang.hpp"
25 
26 extern "C" {
27 #include "libyang.h"
28 #include "tree_schema.h"
29 }
30 
31 namespace libyang {
32 
44 class Module
45 {
46 public:
48  Module(struct lys_module *module, S_Deleter deleter);
49  ~Module();
51  const char *name() {return module->name;};
53  const char *prefix() {return module->prefix;};
55  const char *dsc() {return module->dsc;};
57  const char *ref() {return module->ref;};
59  const char *org() {return module->org;};
61  const char *contact() {return module->contact;};
63  const char *filepath() {return module->filepath;};
65  uint8_t type() {return module->type;};
67  uint8_t version() {return module->version;};
69  uint8_t deviated() {return module->deviated;};
71  uint8_t disabled() {return module->disabled;};
73  uint8_t implemented() {return module->implemented;};
75  uint8_t rev_size() {return module->rev_size;};
77  uint8_t imp_size() {return module->imp_size;};
79  uint8_t inc_size() {return module->inc_size;};
81  uint8_t ident_size() {return module->ident_size;};
83  uint8_t tpdf_size() {return module->tpdf_size;};
85  uint8_t features_size() {return module->features_size;};
87  uint8_t augment_size() {return module->augment_size;};
89  uint8_t devaiation_size() {return module->deviation_size;};
91  uint8_t extensions_size() {return module->extensions_size;};
93  uint8_t ext_size() {return module->ext_size;};
95  const char *ns() {return module->ns;};
97  S_Revision rev();
99  std::vector<S_Deviation> deviation();
101  S_Schema_Node data() LY_NEW(module, data, Schema_Node);
103  std::vector<S_Schema_Node> data_instantiables(int options);
105  std::string print_mem(LYS_OUTFORMAT format, int options);
106  std::string print_mem(LYS_OUTFORMAT format, const char *target, int options);
107 
108  int feature_enable(const char *feature);
109  int feature_disable(const char *feature);
110  int feature_state(const char *feature);
111 
112  friend Context;
113  friend Data_Node;
114 
115 private:
116  struct lys_module *module;
117  S_Deleter deleter;
118 };
119 
125 {
126 public:
128  Submodule(struct lys_submodule *submodule, S_Deleter deleter);
129  ~Submodule();
131  S_Context ctx() LY_NEW(submodule, ctx, Context);
133  const char *name() {return submodule->name;};
135  const char *prefix() {return submodule->prefix;};
137  const char *dsc() {return submodule->dsc;};
139  const char *ref() {return submodule->ref;};
141  const char *org() {return submodule->org;};
143  const char *contact() {return submodule->contact;};
145  const char *filepath() {return submodule->filepath;};
147  uint8_t type() {return submodule->type;};
149  uint8_t version() {return submodule->version;};
151  uint8_t deviated() {return submodule->deviated;};
153  uint8_t disabled() {return submodule->disabled;};
155  uint8_t implemented() {return submodule->implemented;};
157  uint8_t rev_size() {return submodule->rev_size;};
159  uint8_t imp_size() {return submodule->imp_size;};
161  uint8_t inc_size() {return submodule->inc_size;};
163  uint8_t ident_size() {return submodule->ident_size;};
165  uint8_t tpdf_size() {return submodule->tpdf_size;};
167  uint8_t features_size() {return submodule->features_size;};
169  uint8_t augment_size() {return submodule->augment_size;};
171  uint8_t deviation_size() {return submodule->deviation_size;};
173  uint8_t extensions_size() {return submodule->extensions_size;};
175  uint8_t ext_size() {return submodule->ext_size;};
177  S_Revision rev();
179  std::vector<S_Deviation> deviation();
181  S_Module belongsto() LY_NEW(submodule, belongsto, Module);
182 
183 private:
184  struct lys_submodule *submodule;
185  S_Deleter deleter;
186 };
187 
189 {
190 public:
192  Type_Info_Binary(struct lys_type_info_binary *info_binary, S_Deleter deleter);
193  ~Type_Info_Binary();
195  S_Restr length();
196 
197 private:
198  lys_type_info_binary *info_binary;
199  S_Deleter deleter;
200 };
201 
202 class Type_Bit
203 {
204 public:
206  Type_Bit(struct lys_type_bit *info_bit, S_Deleter deleter);
207  ~Type_Bit();
209  const char *name() {return info_bit->name;};
211  const char *dsc() {return info_bit->dsc;};
213  const char *ref() {return info_bit->ref;};
215  uint16_t flags() {return info_bit->flags;};
217  uint8_t ext_size() {return info_bit->ext_size;};
219  uint8_t iffeature_size() {return info_bit->iffeature_size;};
221  uint32_t pos() {return info_bit->pos;};
223  std::vector<S_Ext_Instance> ext();
225  std::vector<S_Iffeature> iffeature();
226 
227 private:
228  lys_type_bit *info_bit;
229  S_Deleter deleter;
230 };
231 
233 {
234 public:
236  Type_Info_Bits(struct lys_type_info_bits *info_bits, S_Deleter deleter);
237  ~Type_Info_Bits();
239  std::vector<S_Type_Bit> bit();
241  unsigned int count() {return info_bits->count;};
242 
243 private:
244  lys_type_info_bits *info_bits;
245  S_Deleter deleter;
246 };
247 
249 {
250 public:
252  Type_Info_Dec64(struct lys_type_info_dec64 *info_dec64, S_Deleter deleter);
253  ~Type_Info_Dec64();
255  S_Restr range();
257  uint8_t dig() {return info_dec64->dig;}
259  uint8_t div() {return info_dec64->div;}
260 
261 private:
262  lys_type_info_dec64 *info_dec64;
263  S_Deleter deleter;
264 };
265 
267 {
268 public:
270  Type_Enum(struct lys_type_enum *info_enum, S_Deleter deleter);
271  ~Type_Enum();
273  const char *name() {return info_enum->name;};
275  const char *dsc() {return info_enum->dsc;};
277  const char *ref() {return info_enum->ref;};
279  uint16_t flags() {return info_enum->flags;};
281  uint8_t ext_size() {return info_enum->ext_size;};
283  uint8_t iffeature_size() {return info_enum->iffeature_size;};
285  int32_t value() {return info_enum->value;};
287  std::vector<S_Ext_Instance> ext();
289  std::vector<S_Iffeature> iffeature();
290 
291 private:
292  lys_type_enum *info_enum;
293  S_Deleter deleter;
294 };
295 
297 {
298 public:
300  Type_Info_Enums(struct lys_type_info_enums *info_enums, S_Deleter deleter);
301  ~Type_Info_Enums();
303  std::vector<S_Type_Enum> enm();
305  unsigned int count() {return info_enums->count;};
306 
307 private:
308  lys_type_info_enums *info_enums;
309  S_Deleter deleter;
310 };
311 
313 {
314 public:
316  Type_Info_Ident(struct lys_type_info_ident *info_ident, S_Deleter deleter);
317  ~Type_Info_Ident();
319  std::vector<S_Ident> ref();
321  int count() {return info_ident->count;};
322 
323 private:
324  lys_type_info_ident *info_ident;
325  S_Deleter deleter;
326 };
327 
329 {
330 public:
332  Type_Info_Inst(struct lys_type_info_inst *info_inst, S_Deleter deleter);
333  ~Type_Info_Inst();
335  int8_t req() {return info_inst->req;};
336 
337 private:
338  lys_type_info_inst *info_inst;
339  S_Deleter deleter;
340 };
341 
343 {
344 public:
346  Type_Info_Num(struct lys_type_info_num *info_num, S_Deleter deleter);
347  ~Type_Info_Num();
349  S_Restr range();
350 
351 private:
352  lys_type_info_num *info_num;
353  S_Deleter deleter;
354 };
355 
357 {
358 public:
360  Type_Info_Lref(struct lys_type_info_lref *info_lref, S_Deleter deleter);
361  ~Type_Info_Lref();
363  const char *path() {return info_lref->path;};
365  S_Schema_Node_Leaf target();
367  int8_t req() {return info_lref->req;};
368 
369 private:
370  lys_type_info_lref *info_lref;
371  S_Deleter deleter;
372 };
373 
375 {
376 public:
378  Type_Info_Str(struct lys_type_info_str *info_str, S_Deleter deleter);
379  ~Type_Info_Str();
381  S_Restr length();
383  S_Restr patterns();
385  int pat_count() {return info_str->pat_count;};
386 
387 private:
388  lys_type_info_str *info_str;
389  S_Deleter deleter;
390 };
391 
393 {
394 public:
396  Type_Info_Union(struct lys_type_info_union *info_union, S_Deleter deleter);
397  ~Type_Info_Union();
399  std::vector<S_Type> types();
401  int count() {return info_union->count;};
403  int has_ptr_type() {return info_union->has_ptr_type;};
404 
405 private:
406  lys_type_info_union *info_union;
407  S_Deleter deleter;
408 };
409 
411 {
412 public:
414  Type_Info(union lys_type_info info, LY_DATA_TYPE *type, uint8_t flags, S_Deleter deleter);
415  ~Type_Info();
417  S_Type_Info_Binary binary();
419  S_Type_Info_Bits bits();
421  S_Type_Info_Dec64 dec64();
423  S_Type_Info_Enums enums();
425  S_Type_Info_Ident ident();
427  S_Type_Info_Inst inst();
429  S_Type_Info_Num num();
431  S_Type_Info_Lref lref();
433  S_Type_Info_Str str();
435  S_Type_Info_Union uni();
436 
437 private:
438  union lys_type_info info;
440  uint8_t flags;
441  S_Deleter deleter;
442 };
443 
444 class Type
445 {
446 public:
448  Type(struct lys_type *type, S_Deleter deleter);
449  ~Type();
451  LY_DATA_TYPE base() {return type->base;};
453  uint8_t ext_size() {return type->ext_size;};
455  std::vector<S_Ext_Instance> ext();
457  S_Tpdf der();
459  S_Tpdf parent();
461  S_Type_Info info();
462 
463 private:
464  struct lys_type *type;
465  S_Deleter deleter;
466 };
467 
468 class Iffeature {
469 public:
471  Iffeature(struct lys_iffeature *iffeature, S_Deleter deleter);
472  ~Iffeature();
474  uint8_t *expr() {return iffeature->expr;};
476  uint8_t ext_size() {return iffeature->ext_size;};
478  std::vector<S_Ext_Instance> ext();
480  int value();
481 
482 private:
483  struct lys_iffeature *iffeature;
484  S_Deleter deleter;
485 };
486 
488 {
489 public:
491  Ext_Instance(lys_ext_instance *ext_instance, S_Deleter deleter);
492  ~Ext_Instance();
493  //TODO void *parent();
495  const char *arg_value() {return ext_instance->arg_value;};
497  uint16_t flags() {return ext_instance->flags;};
499  uint8_t ext_size() {return ext_instance->ext_size;};
501  uint8_t insubstmt_index() {return ext_instance->insubstmt_index;};
503  uint8_t insubstmt() {return ext_instance->insubstmt;};
505  uint8_t parent_type() {return ext_instance->parent_type;};
507  uint8_t ext_type() {return ext_instance->ext_type;};
509  std::vector<S_Ext_Instance> ext();
511  S_Ext def() LY_NEW(ext_instance, def, Ext);
513  void *priv() {return ext_instance->priv;};
515  S_Module module() LY_NEW(ext_instance, module, Module);
517  LYS_NODE nodetype() {return ext_instance->nodetype;};
518 private:
519  struct lys_ext_instance *ext_instance;
520  S_Deleter deleter;
521 };
522 
524 {
525 public:
527  Schema_Node(lys_node *node, S_Deleter deleter);
528  virtual ~Schema_Node();
530  const char *name() {return node->name;};
532  const char *dsc() {return node->dsc;};
534  const char *ref() {return node->ref;};
536  uint16_t flags() {return node->flags;};
538  uint8_t ext_size() {return node->ext_size;};
540  uint8_t iffeature_size() {return node->iffeature_size;};
542  std::vector<S_Ext_Instance> ext();
544  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(node, iffeature, iffeature_size, Iffeature);
546  S_Module module();
548  LYS_NODE nodetype() {return node->nodetype;};
550  virtual S_Schema_Node parent();
552  virtual S_Schema_Node child();
554  virtual S_Schema_Node next();
556  virtual S_Schema_Node prev();
557 
559  std::string path(int options = 0);
561  int validate_value(const char *value) {return lyd_validate_value(node, value);};
563  std::vector<S_Schema_Node> child_instantiables(int options);
565  S_Set find_path(const char *path);
567  S_Set xpath_atomize(enum lyxp_node_type ctx_node_type, const char *expr, int options);
569  S_Set xpath_atomize(int options);
570  // void *priv;
571 
572  /* emulate TREE macro's */
574  std::vector<S_Schema_Node> tree_for();
576  std::vector<S_Schema_Node> tree_dfs();
577 
578  /* SWIG can not access private variables so it needs public getters */
579  struct lys_node *swig_node() {return node;};
580  S_Deleter swig_deleter() {return deleter;};
581 
582  friend Set;
583  friend Data_Node;
584  friend Context;
599 
600 private:
601  struct lys_node *node;
602  S_Deleter deleter;
603 };
604 
606 {
607 public:
608  Schema_Node_Container(S_Schema_Node derived):
609  Schema_Node(derived->node, derived->deleter),
610  node(derived->node),
611  deleter(derived->deleter)
612  {
613  if (derived->node->nodetype != LYS_CONTAINER) {
614  throw std::invalid_argument("Type must be LYS_CONTAINER");
615  }
616  };
618  Schema_Node_Container(struct lys_node *node, S_Deleter deleter):
619  Schema_Node(node, deleter),
620  node(node),
621  deleter(deleter)
622  {};
625  S_When when();
627  S_Restr must();
629  S_Tpdf ptdf();
631  const char *presence() {return ((struct lys_node_container *) node)->presence;};
632 
633 private:
634  struct lys_node *node;
635  S_Deleter deleter;
636 };
637 
639 {
640 public:
641  Schema_Node_Choice(S_Schema_Node derived):
642  Schema_Node(derived->node, derived->deleter),
643  node(derived->node),
644  deleter(derived->deleter)
645  {
646  if (derived->node->nodetype != LYS_CHOICE) {
647  throw std::invalid_argument("Type must be LYS_CHOICE");
648  }
649  };
651  Schema_Node_Choice(struct lys_node *node, S_Deleter deleter):
652  Schema_Node(node, deleter),
653  node(node),
654  deleter(deleter)
655  {};
658  S_When when();
660  S_Schema_Node dflt();
661 
662 private:
663  struct lys_node *node;
664  S_Deleter deleter;
665 };
666 
668 {
669 public:
670  Schema_Node_Leaf(S_Schema_Node derived):
671  Schema_Node(derived->node, derived->deleter),
672  node(derived->node),
673  deleter(derived->deleter)
674  {
675  if (derived->node->nodetype != LYS_LEAF) {
676  throw std::invalid_argument("Type must be LYS_LEAF");
677  }
678  };
680  Schema_Node_Leaf(struct lys_node *node, S_Deleter deleter):
681  Schema_Node(node, deleter),
682  node(node),
683  deleter(deleter)
684  {};
685  ~Schema_Node_Leaf();
687  S_Set backlinks();
689  S_When when();
691  S_Type type();
693  const char *units() {return ((struct lys_node_leaf *)node)->units;};
695  const char *dflt() {return ((struct lys_node_leaf *)node)->dflt;};
696  S_Schema_Node child() override {return nullptr;};
698  S_Schema_Node_List is_key();
699 
700 private:
701  struct lys_node *node;
702  S_Deleter deleter;
703 };
704 
706 {
707 public:
708  Schema_Node_Leaflist(S_Schema_Node derived):
709  Schema_Node(derived->node, derived->deleter),
710  node(derived->node),
711  deleter(derived->deleter)
712  {
713  if (derived->node->nodetype != LYS_LEAFLIST) {
714  throw std::invalid_argument("Type must be LYS_LEAFLIST");
715  }
716  };
718  Schema_Node_Leaflist(struct lys_node *node, S_Deleter deleter):
719  Schema_Node(node, deleter),
720  node(node),
721  deleter(deleter)
722  {};
725  uint8_t dflt_size() {return ((struct lys_node_leaflist *)node)->dflt_size;};
727  uint8_t must_size() {return ((struct lys_node_leaflist *)node)->must_size;};
729  S_When when();
731  S_Set backlinks();
733  std::vector<S_Restr> must();
735  S_Type type();
737  const char *units() {return ((struct lys_node_leaflist *)node)->units;};
739  std::vector<std::string> dflt();
741  uint32_t min() {return ((struct lys_node_leaflist *)node)->min;};
743  uint32_t max() {return ((struct lys_node_leaflist *)node)->max;};
744  S_Schema_Node child() override {return nullptr;};
745 
746 private:
747  struct lys_node *node;
748  S_Deleter deleter;
749 };
750 
752 {
753 public:
754  Schema_Node_List(S_Schema_Node derived):
755  Schema_Node(derived->node, derived->deleter),
756  node(derived->node),
757  deleter(derived->deleter)
758  {
759  if (derived->node->nodetype != LYS_LIST) {
760  throw std::invalid_argument("Type must be LYS_LIST");
761  }
762  };
764  Schema_Node_List(struct lys_node *node, S_Deleter deleter):
765  Schema_Node(node, deleter),
766  node(node),
767  deleter(deleter)
768  {};
769  ~Schema_Node_List();
771  uint8_t must_size() {return ((struct lys_node_list *)node)->must_size;};
773  uint8_t tpdf_size() {return ((struct lys_node_list *)node)->tpdf_size;};
775  uint8_t keys_size() {return ((struct lys_node_list *)node)->keys_size;};
777  uint8_t unique_size() {return ((struct lys_node_list *)node)->unique_size;};
779  S_When when();
781  std::vector<S_Restr> must();
783  std::vector<S_Tpdf> tpdf();
785  std::vector<S_Schema_Node_Leaf> keys();
787  std::vector<S_Unique> unique();
789  uint32_t min() {return ((struct lys_node_list *)node)->min;};
791  uint32_t max() {return ((struct lys_node_list *)node)->max;};
793  const char *keys_str() {return ((struct lys_node_list *)node)->keys_str;};
794 
795 private:
796  struct lys_node *node;
797  S_Deleter deleter;
798 };
799 
801 {
802 public:
803  Schema_Node_Anydata(S_Schema_Node derived):
804  Schema_Node(derived->node, derived->deleter),
805  node(derived->node),
806  deleter(derived->deleter)
807  {
808  if (derived->node->nodetype != LYS_ANYDATA && derived->node->nodetype != LYS_ANYXML) {
809  throw std::invalid_argument("Type must be LYS_ANYDATA or LYS_ANYXML");
810  }
811  };
813  Schema_Node_Anydata(struct lys_node *node, S_Deleter deleter):
814  Schema_Node(node, deleter),
815  node(node),
816  deleter(deleter)
817  {};
820  uint8_t must_size() {return ((struct lys_node_list *)node)->must_size;};
822  S_When when();
824  std::vector<S_Restr> must();
825 
826 private:
827  struct lys_node *node;
828  S_Deleter deleter;
829 };
830 
832 {
833 public:
834  Schema_Node_Uses(S_Schema_Node derived):
835  Schema_Node(derived->node, derived->deleter),
836  node(derived->node),
837  deleter(derived->deleter)
838  {
839  if (derived->node->nodetype != LYS_USES) {
840  throw std::invalid_argument("Type must be LYS_USES");
841  }
842  };
844  Schema_Node_Uses(struct lys_node *node, S_Deleter deleter):
845  Schema_Node(node, deleter),
846  node(node),
847  deleter(deleter)
848  {};
849  ~Schema_Node_Uses();
851  uint8_t augment_size() {return ((struct lys_node_uses *)node)->augment_size;};
853  S_When when();
855  std::vector<S_Refine> refine();
857  std::vector<S_Schema_Node_Augment> augment();
859  S_Schema_Node_Grp grp();
860 
861 private:
862  struct lys_node *node;
863  S_Deleter deleter;
864 };
865 
867 {
868 public:
869  Schema_Node_Grp(S_Schema_Node derived):
870  Schema_Node(derived->node, derived->deleter),
871  node(derived->node),
872  deleter(derived->deleter)
873  {
874  if (derived->node->nodetype != LYS_GROUPING) {
875  throw std::invalid_argument("Type must be LYS_GROUPING");
876  }
877  };
879  Schema_Node_Grp(struct lys_node *node, S_Deleter deleter):
880  Schema_Node(node, deleter),
881  node(node),
882  deleter(deleter)
883  {};
884  ~Schema_Node_Grp();
886  uint8_t tpdf_size() {return ((struct lys_node_grp *)node)->tpdf_size;};
888  std::vector<S_Tpdf> tpdf();
889 
890 private:
891  struct lys_node *node;
892  S_Deleter deleter;
893 };
894 
896 {
897 public:
898  Schema_Node_Case(S_Schema_Node derived):
899  Schema_Node(derived->node, derived->deleter),
900  node(derived->node),
901  deleter(derived->deleter)
902  {
903  if (derived->node->nodetype != LYS_CASE) {
904  throw std::invalid_argument("Type must be LYS_CASE");
905  }
906  };
908  Schema_Node_Case(struct lys_node *node, S_Deleter deleter):
909  Schema_Node(node, deleter),
910  node(node),
911  deleter(deleter)
912  {};
913  ~Schema_Node_Case();
915  S_When when();
916 
917 private:
918  struct lys_node *node;
919  S_Deleter deleter;
920 };
921 
923 {
924 public:
925  Schema_Node_Inout(S_Schema_Node derived):
926  Schema_Node(derived->node, derived->deleter),
927  node(derived->node),
928  deleter(derived->deleter)
929  {
930  if (derived->node->nodetype != LYS_INPUT && derived->node->nodetype != LYS_OUTPUT) {
931  throw std::invalid_argument("Type must be LYS_INOUT or LYS_OUTPUT");
932  }
933  };
935  Schema_Node_Inout(struct lys_node *node, S_Deleter deleter):
936  Schema_Node(node, deleter),
937  node(node),
938  deleter(deleter)
939  {};
942  uint8_t tpdf_size() {return ((struct lys_node_inout *)node)->tpdf_size;};
944  uint8_t must_size() {return ((struct lys_node_inout *)node)->must_size;};
946  std::vector<S_Tpdf> tpdf();
948  std::vector<S_Restr> must();
949 
950 private:
951  struct lys_node *node;
952  S_Deleter deleter;
953 };
954 
956 {
957 public:
958  Schema_Node_Notif(S_Schema_Node derived):
959  Schema_Node(derived->node, derived->deleter),
960  node(derived->node),
961  deleter(derived->deleter)
962  {
963  if (derived->node->nodetype != LYS_NOTIF) {
964  throw std::invalid_argument("Type must be LYS_NOTIF");
965  }
966  };
968  Schema_Node_Notif(struct lys_node *node, S_Deleter deleter):
969  Schema_Node(node, deleter),
970  node(node),
971  deleter(deleter)
972  {};
975  uint8_t tpdf_size() {return ((struct lys_node_notif *)node)->tpdf_size;};
977  uint8_t must_size() {return ((struct lys_node_notif *)node)->must_size;};
979  std::vector<S_Tpdf> tpdf();
981  std::vector<S_Restr> must();
982 
983 private:
984  struct lys_node *node;
985  S_Deleter deleter;
986 };
987 
989 {
990 public:
991  Schema_Node_Rpc_Action(S_Schema_Node derived):
992  Schema_Node(derived->node, derived->deleter),
993  node(derived->node),
994  deleter(derived->deleter)
995  {
996  if (derived->node->nodetype != LYS_ACTION && derived->node->nodetype != LYS_RPC) {
997  throw std::invalid_argument("Type must be LYS_ACTION or LYS_RPC");
998  }
999  };
1001  Schema_Node_Rpc_Action(struct lys_node *node, S_Deleter deleter):
1002  Schema_Node(node, deleter),
1003  node(node),
1004  deleter(deleter)
1005  {};
1008  uint8_t tpdf_size() {return ((struct lys_node_rpc_action *)node)->tpdf_size;};
1010  std::vector<S_Tpdf> tpdf();
1011 
1012 private:
1013  struct lys_node *node;
1014  S_Deleter deleter;
1015 };
1016 
1018 {
1019 public:
1020  Schema_Node_Augment(S_Schema_Node derived):
1021  Schema_Node(derived->node, derived->deleter),
1022  node(derived->node),
1023  deleter(derived->deleter)
1024  {
1025  if (derived->node->nodetype != LYS_AUGMENT) {
1026  throw std::invalid_argument("Type must be LYS_AUGMENT");
1027  }
1028  };
1030  Schema_Node_Augment(struct lys_node *node, S_Deleter deleter):
1031  Schema_Node(node, deleter),
1032  node(node),
1033  deleter(deleter)
1034  {};
1037  S_When when();
1039  S_Schema_Node target() LY_NEW_CASTED(lys_node_augment, node, target, Schema_Node);
1040 
1041 private:
1042  struct lys_node *node;
1043  S_Deleter deleter;
1044 };
1045 
1046 class Substmt
1047 {
1048 public:
1050  Substmt(struct lyext_substmt *substmt, S_Deleter deleter);
1051  ~Substmt();
1053  LY_STMT stmt() {return substmt->stmt;};
1055  size_t offset() {return substmt->offset;};
1057  LY_STMT_CARD cardinality() {return substmt->cardinality;};
1058 private:
1059  struct lyext_substmt *substmt;
1060  S_Deleter deleter;
1061 };
1062 
1063 class Ext
1064 {
1065 public:
1067  Ext(struct lys_ext *ext, S_Deleter deleter);
1068  ~Ext();
1070  const char *name() {return ext->name;};
1072  const char *dsc() {return ext->dsc;};
1074  const char *ref() {return ext->ref;};
1076  uint16_t flags() {return ext->flags;};
1078  uint8_t ext_size() {return ext->ext_size;};
1080  std::vector<S_Ext_Instance> ext_instance();
1082  const char *argument() {return ext->argument;};
1084  S_Module module();
1085  //struct lyext_plugin *plugin;
1086 private:
1087  struct lys_ext *ext;
1088  S_Deleter deleter;
1089 };
1090 
1092 {
1093 public:
1095  Refine_Mod_List(struct lys_refine_mod_list *list, S_Deleter deleter);
1096  ~Refine_Mod_List();
1098  uint32_t min() {return list->min;};
1100  uint32_t max() {return list->max;};
1101 
1102 private:
1103  struct lys_refine_mod_list *list;
1104  S_Deleter deleter;
1105 };
1106 
1108 {
1109 public:
1111  Refine_Mod(union lys_refine_mod mod, uint16_t target_type, S_Deleter deleter);
1112  ~Refine_Mod();
1114  const char *presence() {return target_type == LYS_CONTAINER ? mod.presence : nullptr;};
1116  S_Refine_Mod_List list();
1117 
1118 private:
1119  union lys_refine_mod mod;
1120  uint16_t target_type;
1121  S_Deleter deleter;
1122 };
1123 
1124 class Refine
1125 {
1126 public:
1128  Refine(struct lys_refine *refine, S_Deleter deleter);
1129  ~Refine();
1131  const char *target_name() {return refine->target_name;};
1133  const char *dsc() {return refine->dsc;};
1135  const char *ref() {return refine->ref;};
1137  uint16_t flags() {return refine->flags;};
1139  uint8_t ext_size() {return refine->ext_size;};
1141  uint8_t iffeature_size() {return refine->iffeature_size;};
1143  uint16_t target_type() {return refine->target_type;};
1145  uint8_t must_size() {return refine->must_size;};
1147  uint8_t dflt_size() {return refine->dflt_size;};
1149  std::vector<S_Ext_Instance> ext();
1151  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(refine, iffeature, iffeature_size, Iffeature);
1153  S_Module module();
1155  std::vector<S_Restr> must();
1157  std::vector<std::string> dflt() LY_NEW_STRING_LIST(refine, dflt, dflt_size);
1159  S_Refine_Mod mod();
1160 
1161 private:
1162  struct lys_refine *refine;
1163  S_Deleter deleter;
1164 };
1165 
1166 class Deviate
1167 {
1168 public:
1170  Deviate(struct lys_deviate *deviate, S_Deleter deleter);
1171  ~Deviate();
1173  LYS_DEVIATE_TYPE mod() {return deviate->mod;};
1175  uint8_t flags() {return deviate->flags;};
1177  uint8_t dflt_size() {return deviate->dflt_size;};
1179  uint8_t ext_size() {return deviate->ext_size;};
1181  uint8_t min_set() {return deviate->min_set;};
1183  uint8_t max_set() {return deviate->max_set;};
1185  uint8_t must_size() {return deviate->must_size;};
1187  uint8_t unique_size() {return deviate->unique_size;};
1189  uint32_t min() {return deviate->min;};
1191  uint32_t max() {return deviate->max;};
1193  S_Restr must();
1195  S_Unique unique();
1197  S_Type type();
1199  const char *units() {return deviate->units;};
1201  std::vector<std::string> dflt() LY_NEW_STRING_LIST(deviate, dflt, dflt_size);
1203  std::vector<S_Ext_Instance> ext();
1204 
1205 private:
1206  struct lys_deviate *deviate;
1207  S_Deleter deleter;
1208 };
1209 
1211 {
1212 public:
1214  Deviation(struct lys_deviation *deviation, S_Deleter deleter);
1215  ~Deviation();
1217  const char *target_name() {return deviation->target_name;};
1219  const char *dsc() {return deviation->dsc;};
1221  const char *ref() {return deviation->ref;};
1223  S_Schema_Node orig_node();
1225  uint8_t deviate_size() {return deviation->deviate_size;};
1227  uint8_t ext_size() {return deviation->ext_size;};
1229  std::vector<S_Deviate> deviate();
1231  std::vector<S_Ext_Instance> ext();
1232 
1233 private:
1234  struct lys_deviation *deviation;
1235  S_Deleter deleter;
1236 };
1237 
1238 class Import
1239 {
1240 public:
1242  Import(struct lys_import *import, S_Deleter deleter);
1243  ~Import();
1245  S_Module module() LY_NEW(import, module, Module);
1247  const char *prefix() {return import->prefix;};
1249  char *rev() {return &import->rev[0];};
1251  uint8_t ext_size() {return import->ext_size;};
1253  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(import, ext, ext_size, Ext_Instance);
1255  const char *dsc() {return import->dsc;};
1257  const char *ref() {return import->ref;};
1258 
1259 private:
1260  struct lys_import *import;
1261  S_Deleter deleter;
1262 };
1263 
1264 class Include
1265 {
1266 public:
1268  Include(struct lys_include *include, S_Deleter deleter);
1269  ~Include();
1271  S_Submodule submodule() LY_NEW(include, submodule, Submodule);
1273  char *rev() {return &include->rev[0];};
1275  uint8_t ext_size() {return include->ext_size;};
1277  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(include, ext, ext_size, Ext_Instance);
1279  const char *dsc() {return include->dsc;};
1281  const char *ref() {return include->ref;};
1282 
1283 private:
1284  struct lys_include *include;
1285  S_Deleter deleter;
1286 };
1287 
1289 {
1290 public:
1292  Revision(lys_revision *revision, S_Deleter deleter);
1293  ~Revision();
1295  char *date() {return &revision->date[0];};
1297  uint8_t ext_size() {return revision->ext_size;};
1299  const char *dsc() {return revision->dsc;};
1301  const char *ref() {return revision->ref;};
1302 
1303 private:
1304  struct lys_revision *revision;
1305  S_Deleter deleter;
1306 };
1307 
1308 class Tpdf
1309 {
1310 public:
1312  Tpdf(struct lys_tpdf *tpdf, S_Deleter deleter);
1313  ~Tpdf();
1315  const char *name() {return tpdf->name;};
1317  const char *dsc() {return tpdf->dsc;};
1319  const char *ref() {return tpdf->ref;};
1321  uint16_t flags() {return tpdf->flags;};
1323  uint8_t ext_size() {return tpdf->ext_size;};
1325  uint8_t padding_iffsize() {return tpdf->padding_iffsize;};
1327  uint8_t has_union_leafref() {return tpdf->has_union_leafref;};
1329  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(tpdf, ext, ext_size, Ext_Instance);
1331  const char *units() {return tpdf->units;};
1333  S_Module module() LY_NEW(tpdf, module, Module);
1335  S_Type type();
1337  const char *dflt() {return tpdf->dflt;};
1338 
1339 private:
1340  struct lys_tpdf *tpdf;
1341  S_Deleter deleter;
1342 };
1343 
1344 class Unique
1345 {
1346 public:
1348  Unique(struct lys_unique *unique, S_Deleter deleter);
1349  ~Unique();
1351  std::vector<std::string> expr() LY_NEW_STRING_LIST(unique, expr, expr_size);
1353  uint8_t expr_size() {return unique->expr_size;};
1355  uint8_t trg_type() {return unique->trg_type;};
1356 
1357 private:
1358  struct lys_unique *unique;
1359  S_Deleter deleter;
1360 };
1361 
1362 class Feature
1363 {
1364 public:
1366  Feature(struct lys_feature *feature, S_Deleter);
1367  ~Feature();
1369  const char *name() {return feature->name;};
1371  const char *dsc() {return feature->dsc;};
1373  const char *ref() {return feature->ref;};
1375  uint16_t flags() {return feature->flags;};
1377  uint8_t ext_size() {return feature->ext_size;};
1379  uint8_t iffeature_size() {return feature->iffeature_size;};
1381  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(feature, ext, ext_size, Ext_Instance);
1383  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(feature, iffeature, iffeature_size, Iffeature);
1385  S_Module module() LY_NEW(feature, module, Module);
1387  S_Set depfeatures() LY_NEW(feature, depfeatures, Set);
1388 
1389 private:
1390  struct lys_feature *feature;
1391  S_Deleter deleter;
1392 };
1393 
1394 class Restr
1395 {
1396 public:
1398  Restr(struct lys_restr *restr, S_Deleter deleter);
1399  ~Restr();
1401  const char *expr() {return restr->expr;};
1403  const char *dsc() {return restr->dsc;};
1405  const char *ref() {return restr->ref;};
1407  const char *eapptag() {return restr->eapptag;};
1409  const char *emsg() {return restr->emsg;};
1411  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(restr, ext, ext_size, Ext_Instance);
1413  uint8_t ext_size() {return restr->ext_size;};
1414 
1415 private:
1416  struct lys_restr *restr;
1417  S_Deleter deleter;
1418 };
1419 
1420 class When
1421 {
1422 public:
1424  When(struct lys_when *when, S_Deleter deleter = nullptr);
1425  ~When();
1427  const char *cond() {return when->cond;};
1429  const char *dsc() {return when->dsc;};
1431  const char *ref() {return when->ref;};
1433  std::vector<S_Ext_Instance> ext();
1435  uint8_t ext_size() {return when->ext_size;};
1436 
1437 private:
1438  struct lys_when *when;
1439  S_Deleter deleter;
1440 };
1441 
1442 class Ident
1443 {
1444 public:
1446  Ident(struct lys_ident *ident, S_Deleter deleter);
1447  ~Ident();
1449  const char *name() {return ident->name;};
1451  const char *dsc() {return ident->dsc;};
1453  const char *ref() {return ident->ref;};
1455  uint16_t flags() {return ident->flags;};
1457  uint8_t ext_size() {return ident->ext_size;};
1459  uint8_t iffeature_size() {return ident->iffeature_size;};
1461  uint8_t base_size() {return ident->base_size;};
1463  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(ident, ext, ext_size, Ext_Instance);
1465  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(ident, iffeature, iffeature_size, Iffeature);
1467  S_Module module() LY_NEW(ident, module, Module);
1469  std::vector<S_Ident> base();
1471  S_Set der() LY_NEW(ident, der, Set);
1472 
1473 private:
1474  struct lys_ident *ident;
1475  S_Deleter deleter;
1476 };
1477 
1480 }
1481 
1482 #endif
libyang::Revision::ref
const char * ref()
Definition: Tree_Schema.hpp:1301
libyang::Schema_Node_Choice::Schema_Node_Choice
Schema_Node_Choice(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:651
lys_module::rev_size
uint8_t rev_size
Definition: tree_schema.h:700
LYS_OUTFORMAT
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
Definition: tree_schema.h:204
libyang::Schema_Node::swig_deleter
S_Deleter swig_deleter()
Definition: Tree_Schema.hpp:580
libyang::Import::ref
const char * ref()
Definition: Tree_Schema.hpp:1257
libyang::Submodule::belongsto
S_Module belongsto()
Definition: Tree_Schema.hpp:181
libyang::Schema_Node_Leaflist::min
uint32_t min()
Definition: Tree_Schema.hpp:741
libyang::Type_Bit::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:217
LYS_CHOICE
@ LYS_CHOICE
Definition: tree_schema.h:240
libyang::Module::imp_size
uint8_t imp_size()
Definition: Tree_Schema.hpp:77
lys_deviate::unique_size
uint8_t unique_size
Definition: tree_schema.h:1936
lys_restr::emsg
const char * emsg
Definition: tree_schema.h:2067
lys_tpdf::has_union_leafref
uint8_t has_union_leafref
Definition: tree_schema.h:2012
libyang::Schema_Node_Leaflist::Schema_Node_Leaflist
Schema_Node_Leaflist(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:718
libyang::Ext_Instance::module
S_Module module()
Definition: Tree_Schema.hpp:515
libyang::Feature::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1375
libyang::Type_Enum::dsc
const char * dsc()
Definition: Tree_Schema.hpp:275
libyang::Submodule::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:175
libyang::Deviation::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1219
lys_type_info_enums
Container for information about enumeration types (LY_TYPE_ENUM), used in lys_type_info.
Definition: tree_schema.h:887
lys_ident::base_size
uint8_t base_size
Definition: tree_schema.h:2100
libyang::Schema_Node_Case::Schema_Node_Case
Schema_Node_Case(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:908
lys_type
YANG type structure providing information from the schema.
Definition: tree_schema.h:981
libyang::Refine::target_name
const char * target_name()
Definition: Tree_Schema.hpp:1131
libyang::Schema_Node_Rpc_Action::Schema_Node_Rpc_Action
Schema_Node_Rpc_Action(S_Schema_Node derived)
Definition: Tree_Schema.hpp:991
libyang::Type_Info_Bits
Definition: Tree_Schema.hpp:232
lys_refine::target_name
const char * target_name
Definition: tree_schema.h:1886
libyang::Type_Info_Union::count
int count()
Definition: Tree_Schema.hpp:401
libyang::Ident::base_size
uint8_t base_size()
Definition: Tree_Schema.hpp:1461
lys_deviate
YANG deviate statement structure, see RFC 6020 sec. 7.18.3.2
Definition: tree_schema.h:1926
libyang::Import::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1251
LYS_LIST
@ LYS_LIST
Definition: tree_schema.h:243
libyang::Module::org
const char * org()
Definition: Tree_Schema.hpp:59
libyang::Deviate::flags
uint8_t flags()
Definition: Tree_Schema.hpp:1175
libyang::Module::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:93
libyang::Substmt::stmt
LY_STMT stmt()
Definition: Tree_Schema.hpp:1053
libyang::Refine::dflt_size
uint8_t dflt_size()
Definition: Tree_Schema.hpp:1147
lys_module::disabled
uint8_t disabled
Definition: tree_schema.h:692
libyang::Schema_Node_Augment::Schema_Node_Augment
Schema_Node_Augment(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:1030
lys_restr
YANG validity restriction (must, length, etc.) structure providing information from the schema.
Definition: tree_schema.h:2060
libyang::Schema_Node::swig_node
struct lys_node * swig_node()
Definition: Tree_Schema.hpp:579
libyang::Schema_Node_Uses
Definition: Tree_Schema.hpp:831
libyang::Schema_Node_Leaflist::Schema_Node_Leaflist
Schema_Node_Leaflist(S_Schema_Node derived)
Definition: Tree_Schema.hpp:708
libyang::Schema_Node_List::keys_size
uint8_t keys_size()
Definition: Tree_Schema.hpp:775
libyang::Import::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1253
LYS_CASE
@ LYS_CASE
Definition: tree_schema.h:245
libyang::Module::Module
Module(struct lys_module *module, S_Deleter deleter)
Definition: Tree_Schema.cpp:31
libyang::Ext::argument
const char * argument()
Definition: Tree_Schema.hpp:1082
libyang::Schema_Node
Definition: Tree_Schema.hpp:523
libyang::Ident::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1455
libyang::Submodule::filepath
const char * filepath()
Definition: Tree_Schema.hpp:145
lys_module::contact
const char * contact
Definition: tree_schema.h:681
lys_ext_instance::insubstmt_index
uint8_t insubstmt_index
Definition: tree_schema.h:481
libyang::Schema_Node::dsc
const char * dsc()
Definition: Tree_Schema.hpp:532
libyang::Refine::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:1141
libyang::Schema_Node_List::Schema_Node_List
Schema_Node_List(S_Schema_Node derived)
Definition: Tree_Schema.hpp:754
libyang::Type_Info_Ident
Definition: Tree_Schema.hpp:312
libyang::Submodule::features_size
uint8_t features_size()
Definition: Tree_Schema.hpp:167
libyang::Refine::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1137
lys_module::type
uint8_t type
Definition: tree_schema.h:683
libyang::Schema_Node::Schema_Node_List
friend Schema_Node_List
Definition: Tree_Schema.hpp:589
libyang::Module::feature_state
int feature_state(const char *feature)
Definition: Tree_Schema.cpp:86
libyang::Revision::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1297
lys_deviation
YANG deviation statement structure, see RFC 6020 sec. 7.18.3
Definition: tree_schema.h:1953
libyang::Type_Info_Union::has_ptr_type
int has_ptr_type()
Definition: Tree_Schema.hpp:403
lys_node_rpc_action
Schema rpc/action node structure.
Definition: tree_schema.h:1785
lys_ext::argument
const char * argument
Definition: tree_schema.h:460
libyang::Restr::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1403
libyang::Feature::ref
const char * ref()
Definition: Tree_Schema.hpp:1373
libyang::Import::module
S_Module module()
Definition: Tree_Schema.hpp:1245
lys_module::imp_size
uint8_t imp_size
Definition: tree_schema.h:701
libyang::Schema_Node_Rpc_Action::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:1008
libyang::Schema_Node_Notif::Schema_Node_Notif
Schema_Node_Notif(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:968
libyang::Schema_Node_Leaf::child
S_Schema_Node child() override
Definition: Tree_Schema.hpp:696
lys_refine::target_type
uint16_t target_type
Definition: tree_schema.h:1894
lys_ext_instance::ext_size
uint8_t ext_size
Definition: tree_schema.h:480
libyang::Schema_Node_Leaflist::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:727
libyang::Schema_Node_Inout::Schema_Node_Inout
Schema_Node_Inout(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:935
libyang::Schema_Node_List::max
uint32_t max()
Definition: Tree_Schema.hpp:791
LYS_CONTAINER
@ LYS_CONTAINER
Definition: tree_schema.h:239
libyang::Ext_Instance::ext_type
uint8_t ext_type()
Definition: Tree_Schema.hpp:507
libyang::Deviate::max
uint32_t max()
Definition: Tree_Schema.hpp:1191
libyang::Deviate::dflt
std::vector< std::string > dflt()
Definition: Tree_Schema.hpp:1201
libyang::Ext
Definition: Tree_Schema.hpp:1063
lys_module
Main schema node structure representing YANG module.
Definition: tree_schema.h:674
LYS_NODE
enum lys_nodetype LYS_NODE
YANG schema node types.
libyang::Submodule::extensions_size
uint8_t extensions_size()
Definition: Tree_Schema.hpp:173
libyang::Module::contact
const char * contact()
Definition: Tree_Schema.hpp:61
libyang::Ident
Definition: Tree_Schema.hpp:1442
libyang::Type_Enum::ref
const char * ref()
Definition: Tree_Schema.hpp:277
lys_module::name
const char * name
Definition: tree_schema.h:676
libyang::Submodule::rev_size
uint8_t rev_size()
Definition: Tree_Schema.hpp:157
libyang::Deviate::min_set
uint8_t min_set()
Definition: Tree_Schema.hpp:1181
libyang::Ext_Instance::flags
uint16_t flags()
Definition: Tree_Schema.hpp:497
libyang::Submodule::prefix
const char * prefix()
Definition: Tree_Schema.hpp:135
libyang::Ext::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1078
libyang::Type_Info_Inst
Definition: Tree_Schema.hpp:328
libyang::Feature::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:1379
lys_type_bit
Single bit value specification for lys_type_info_bits.
Definition: tree_schema.h:828
libyang::When::cond
const char * cond()
Definition: Tree_Schema.hpp:1427
libyang::Schema_Node::Schema_Node_Inout
friend Schema_Node_Inout
Definition: Tree_Schema.hpp:594
libyang::Module::extensions_size
uint8_t extensions_size()
Definition: Tree_Schema.hpp:91
libyang::Schema_Node_Grp::Schema_Node_Grp
Schema_Node_Grp(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:879
libyang::Schema_Node_Anydata::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:820
libyang::Submodule::disabled
uint8_t disabled()
Definition: Tree_Schema.hpp:153
libyang
Definition: Libyang.hpp:30
libyang::Type_Info_Ident::count
int count()
Definition: Tree_Schema.hpp:321
lys_include
YANG include structure used to reference submodules.
Definition: tree_schema.h:1982
lys_when
YANG when restriction, see RFC 6020 sec. 7.19.5
Definition: tree_schema.h:2076
Libyang.hpp
Class implementation for libyang C header libyang.h.
lys_ext::name
const char * name
Definition: tree_schema.h:453
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:2303
libyang::Type_Info_Union
Definition: Tree_Schema.hpp:392
libyang::Module::rev_size
uint8_t rev_size()
Definition: Tree_Schema.hpp:75
lyext_substmt::cardinality
LY_STMT_CARD cardinality
Definition: tree_schema.h:446
lys_module::version
uint8_t version
Definition: tree_schema.h:684
libyang::Tpdf::module
S_Module module()
Definition: Tree_Schema.hpp:1333
libyang::Ext_Instance::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:499
libyang::Submodule::implemented
uint8_t implemented()
Definition: Tree_Schema.hpp:155
lys_type_info_bits
Container for information about bits types (LY_TYPE_BINARY), used in lys_type_info.
Definition: tree_schema.h:847
lyext_substmt
Description of the extension instance substatement.
Definition: tree_schema.h:443
libyang::Schema_Node::Data_Node
friend Data_Node
Definition: Tree_Schema.hpp:583
lys_type_info_binary
Definition: tree_schema.h:820
lys_revision::date
char date[11]
Definition: tree_schema.h:1995
libyang::Ident::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:1459
libyang::Revision
Definition: Tree_Schema.hpp:1288
libyang::Type_Info_Dec64::div
uint8_t div()
Definition: Tree_Schema.hpp:259
libyang::Deviation::target_name
const char * target_name()
Definition: Tree_Schema.hpp:1217
lys_type_info_inst::req
int8_t req
Definition: tree_schema.h:904
libyang::Submodule::deviated
uint8_t deviated()
Definition: Tree_Schema.hpp:151
lys_deviate::min_set
uint8_t min_set
Definition: tree_schema.h:1933
libyang::Ext_Instance::arg_value
const char * arg_value()
Definition: Tree_Schema.hpp:495
libyang::Restr::ref
const char * ref()
Definition: Tree_Schema.hpp:1405
libyang::Ident::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1451
libyang::Module::prefix
const char * prefix()
Definition: Tree_Schema.hpp:53
libyang::Iffeature
Definition: Tree_Schema.hpp:468
libyang::Type_Enum::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:281
libyang::Schema_Node::Schema_Node_Leaf
friend Schema_Node_Leaf
Definition: Tree_Schema.hpp:587
libyang::Type_Bit::ref
const char * ref()
Definition: Tree_Schema.hpp:213
libyang::Type_Info_Num
Definition: Tree_Schema.hpp:342
lys_deviate::max_set
uint8_t max_set
Definition: tree_schema.h:1934
libyang::Restr
Definition: Tree_Schema.hpp:1394
lys_unique
YANG list's unique statement structure, see RFC 6020 sec. 7.8.3
Definition: tree_schema.h:2030
libyang::Schema_Node_Inout::Schema_Node_Inout
Schema_Node_Inout(S_Schema_Node derived)
Definition: Tree_Schema.hpp:925
libyang::Schema_Node_Anydata::Schema_Node_Anydata
Schema_Node_Anydata(S_Schema_Node derived)
Definition: Tree_Schema.hpp:803
libyang::Data_Node
classes for wrapping lyd_node.
Definition: Tree_Data.hpp:97
libyang::Module::augment_size
uint8_t augment_size()
Definition: Tree_Schema.hpp:87
libyang::Module::ident_size
uint8_t ident_size()
Definition: Tree_Schema.hpp:81
libyang::Submodule
classes for wrapping lys_submodule.
Definition: Tree_Schema.hpp:124
libyang::Module::ref
const char * ref()
Definition: Tree_Schema.hpp:57
lys_revision
YANG revision statement for (sub)modules.
Definition: tree_schema.h:1994
libyang::Type_Info_Str
Definition: Tree_Schema.hpp:374
libyang::Schema_Node::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:540
libyang::Restr::expr
const char * expr()
Definition: Tree_Schema.hpp:1401
lys_ext::ext
struct lys_ext_instance ** ext
Definition: tree_schema.h:459
libyang::Submodule::type
uint8_t type()
Definition: Tree_Schema.hpp:147
lys_ext_instance::parent_type
uint8_t parent_type
Definition: tree_schema.h:491
libyang::Module::version
uint8_t version()
Definition: Tree_Schema.hpp:67
libyang::Schema_Node::ref
const char * ref()
Definition: Tree_Schema.hpp:534
lys_refine_mod_list
Container for list modifications in lys_refine_mod.
Definition: tree_schema.h:1868
libyang::Submodule::version
uint8_t version()
Definition: Tree_Schema.hpp:149
libyang::Iffeature::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:476
libyang::Schema_Node_Augment::target
S_Schema_Node target()
Definition: Tree_Schema.hpp:1039
libyang::Type_Bit::flags
uint16_t flags()
Definition: Tree_Schema.hpp:215
libyang::Module::implemented
uint8_t implemented()
Definition: Tree_Schema.hpp:73
libyang::Type_Info_Bits::count
unsigned int count()
Definition: Tree_Schema.hpp:241
libyang::Deviate::min
uint32_t min()
Definition: Tree_Schema.hpp:1189
libyang::Schema_Node::Schema_Node_Uses
friend Schema_Node_Uses
Definition: Tree_Schema.hpp:591
libyang::Schema_Node_Grp::Schema_Node_Grp
Schema_Node_Grp(S_Schema_Node derived)
Definition: Tree_Schema.hpp:869
libyang::Schema_Node_List::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:771
libyang::Type_Enum::flags
uint16_t flags()
Definition: Tree_Schema.hpp:279
LYS_ANYDATA
@ LYS_ANYDATA
Definition: tree_schema.h:254
LYS_LEAF
@ LYS_LEAF
Definition: tree_schema.h:241
lys_refine_mod
Union to hold target modification in lys_refine.
Definition: tree_schema.h:1876
libyang::Module::print_mem
std::string print_mem(LYS_OUTFORMAT format, int options)
Definition: Tree_Schema.cpp:52
libyang::Module::name
const char * name()
Definition: Tree_Schema.hpp:51
libyang::Type_Enum::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:283
libyang::When::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1435
libyang::Deviate::dflt_size
uint8_t dflt_size()
Definition: Tree_Schema.hpp:1177
libyang::Module::type
uint8_t type()
Definition: Tree_Schema.hpp:65
libyang::Unique
Definition: Tree_Schema.hpp:1344
libyang::Ext::ref
const char * ref()
Definition: Tree_Schema.hpp:1074
libyang::Feature::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1377
lys_node_leaf
Schema leaf node structure.
Definition: tree_schema.h:1353
lys_type_info_bits::count
unsigned int count
Definition: tree_schema.h:849
libyang::Submodule::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:165
libyang::Tpdf::ref
const char * ref()
Definition: Tree_Schema.hpp:1319
lys_module::inc_size
uint8_t inc_size
Definition: tree_schema.h:702
libyang::Schema_Node_Inout::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:944
lys_module::ext_size
uint8_t ext_size
Definition: tree_schema.h:711
lys_node_uses
Schema uses node structure.
Definition: tree_schema.h:1569
libyang::When
Definition: Tree_Schema.hpp:1420
libyang::Tpdf::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1321
libyang::Type_Info_Lref::path
const char * path()
Definition: Tree_Schema.hpp:363
libyang::Type_Info_Str::pat_count
int pat_count()
Definition: Tree_Schema.hpp:385
lys_refine_mod_list::min
uint32_t min
Definition: tree_schema.h:1869
libyang::Schema_Node_Inout::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:942
libyang::Schema_Node_Leaf::Schema_Node_Leaf
Schema_Node_Leaf(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:680
libyang::Schema_Node_List::keys_str
const char * keys_str()
Definition: Tree_Schema.hpp:793
lys_module::deviation_size
uint8_t deviation_size
Definition: tree_schema.h:709
lys_deviate::units
const char * units
Definition: tree_schema.h:1944
libyang::Include::ref
const char * ref()
Definition: Tree_Schema.hpp:1281
libyang::Schema_Node_Container
Definition: Tree_Schema.hpp:605
libyang::Ident::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1457
libyang::Type
Definition: Tree_Schema.hpp:444
libyang::Schema_Node_Leaflist
Definition: Tree_Schema.hpp:705
lys_tpdf::padding_iffsize
uint8_t padding_iffsize
Definition: tree_schema.h:2011
libyang.h
The main libyang public header.
libyang::Type_Info_Binary
Definition: Tree_Schema.hpp:188
lys_type_enum
Single enumeration value specification for lys_type_info_enums.
Definition: tree_schema.h:868
libyang::Refine::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1133
libyang::Submodule::inc_size
uint8_t inc_size()
Definition: Tree_Schema.hpp:161
libyang::Type_Info_Dec64::dig
uint8_t dig()
Definition: Tree_Schema.hpp:257
libyang::Ident::name
const char * name()
Definition: Tree_Schema.hpp:1449
libyang::Import
Definition: Tree_Schema.hpp:1238
libyang::Module::feature_disable
int feature_disable(const char *feature)
Definition: Tree_Schema.cpp:83
lys_type_bit::iffeature_size
uint8_t iffeature_size
Definition: tree_schema.h:835
libyang::Schema_Node_Notif::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:975
lys_module::extensions_size
uint8_t extensions_size
Definition: tree_schema.h:710
libyang::Schema_Node_List::Schema_Node_List
Schema_Node_List(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:764
libyang::Schema_Node_Uses::augment_size
uint8_t augment_size()
Definition: Tree_Schema.hpp:851
libyang::Schema_Node_Leaf
Definition: Tree_Schema.hpp:667
lys_ext::dsc
const char * dsc
Definition: tree_schema.h:454
libyang::Submodule::ref
const char * ref()
Definition: Tree_Schema.hpp:139
libyang::Substmt::cardinality
LY_STMT_CARD cardinality()
Definition: Tree_Schema.hpp:1057
libyang::Type_Info_Enums
Definition: Tree_Schema.hpp:296
libyang::Schema_Node_Leaf::dflt
const char * dflt()
Definition: Tree_Schema.hpp:695
lys_node_augment
YANG augment structure (covering both possibilities - uses's substatement as well as (sub)module's su...
Definition: tree_schema.h:1833
lys_module::ns
const char * ns
Definition: tree_schema.h:727
lys_module::features_size
uint8_t features_size
Definition: tree_schema.h:707
libyang::Substmt
Definition: Tree_Schema.hpp:1046
libyang::Deviate::mod
LYS_DEVIATE_TYPE mod()
Definition: Tree_Schema.hpp:1173
libyang::Submodule::ctx
S_Context ctx()
Definition: Tree_Schema.hpp:131
lys_node_container
Schema container node structure.
Definition: tree_schema.h:1263
libyang::Module::data
S_Schema_Node data()
Definition: Tree_Schema.hpp:101
libyang::Schema_Node_Leaflist::max
uint32_t max()
Definition: Tree_Schema.hpp:743
lys_node_grp
Schema grouping node structure.
Definition: tree_schema.h:1616
lys_type_info_dec64::dig
uint8_t dig
Definition: tree_schema.h:858
libyang::Tpdf
Definition: Tree_Schema.hpp:1308
libyang::Include::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1275
libyang::Module::dsc
const char * dsc()
Definition: Tree_Schema.hpp:55
libyang::Schema_Node::Schema_Node_Container
friend Schema_Node_Container
Definition: Tree_Schema.hpp:585
libyang::Substmt::offset
size_t offset()
Definition: Tree_Schema.hpp:1055
lys_type_bit::flags
uint16_t flags
Definition: tree_schema.h:832
libyang::Refine_Mod
Definition: Tree_Schema.hpp:1107
lys_type_enum::value
int32_t value
Definition: tree_schema.h:878
libyang::Schema_Node_Choice
Definition: Tree_Schema.hpp:638
libyang::Module::features_size
uint8_t features_size()
Definition: Tree_Schema.hpp:85
lys_type_info_union::has_ptr_type
int has_ptr_type
Definition: tree_schema.h:958
libyang::Restr::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1411
libyang::Refine_Mod_List::max
uint32_t max()
Definition: Tree_Schema.hpp:1100
libyang::Submodule::org
const char * org()
Definition: Tree_Schema.hpp:141
libyang::Type_Bit::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:219
lys_deviate::flags
uint8_t flags
Definition: tree_schema.h:1929
libyang::Module::deviation
std::vector< S_Deviation > deviation()
Definition: Tree_Schema.cpp:37
lys_module::tpdf_size
uint16_t tpdf_size
Definition: tree_schema.h:705
libyang::Schema_Node::Schema_Node_Action
friend Schema_Node_Action
Definition: Tree_Schema.hpp:596
libyang::Schema_Node::Schema_Node_Leaflist
friend Schema_Node_Leaflist
Definition: Tree_Schema.hpp:588
libyang::Type_Enum
Definition: Tree_Schema.hpp:266
libyang::Schema_Node::Schema_Node_Notif
friend Schema_Node_Notif
Definition: Tree_Schema.hpp:595
libyang::Deviate::max_set
uint8_t max_set()
Definition: Tree_Schema.hpp:1183
libyang::Schema_Node::Context
friend Context
Definition: Tree_Schema.hpp:584
libyang::Type_Info
Definition: Tree_Schema.hpp:410
LY_STMT
LY_STMT
List of YANG statements.
Definition: tree_schema.h:290
LYS_GROUPING
@ LYS_GROUPING
Definition: tree_schema.h:250
libyang::Schema_Node_Leaf::Schema_Node_Leaf
Schema_Node_Leaf(S_Schema_Node derived)
Definition: Tree_Schema.hpp:670
libyang::Restr::emsg
const char * emsg()
Definition: Tree_Schema.hpp:1409
lys_module::prefix
const char * prefix
Definition: tree_schema.h:677
lys_feature
YANG feature definition structure.
Definition: tree_schema.h:2039
LYS_USES
@ LYS_USES
Definition: tree_schema.h:251
libyang::Schema_Node_Anydata
Definition: Tree_Schema.hpp:800
lys_module::augment_size
uint8_t augment_size
Definition: tree_schema.h:708
libyang::Schema_Node::iffeature
std::vector< S_Iffeature > iffeature()
Definition: Tree_Schema.hpp:544
lys_tpdf
YANG typedef structure providing information from the schema.
Definition: tree_schema.h:2005
libyang::Type_Enum::value
int32_t value()
Definition: Tree_Schema.hpp:285
libyang::Submodule::imp_size
uint8_t imp_size()
Definition: Tree_Schema.hpp:159
libyang::Deviation::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1227
lys_type_info_ident
Container for information about identity types (LY_TYPE_IDENT), used in lys_type_info.
Definition: tree_schema.h:895
libyang::Schema_Node_Grp
Definition: Tree_Schema.hpp:866
libyang::Ext::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1072
libyang::Type_Info_Inst::req
int8_t req()
Definition: Tree_Schema.hpp:335
libyang::Schema_Node_Notif
Definition: Tree_Schema.hpp:955
libyang::Schema_Node::Schema_Node_Grp
friend Schema_Node_Grp
Definition: Tree_Schema.hpp:592
LY_DATA_TYPE
LY_DATA_TYPE
YANG built-in types.
Definition: tree_schema.h:792
lys_type_info_str::pat_count
unsigned int pat_count
Definition: tree_schema.h:944
lys_refine::must_size
uint8_t must_size
Definition: tree_schema.h:1897
lys_iffeature::expr
uint8_t * expr
Definition: tree_schema.h:1079
libyang::Module::devaiation_size
uint8_t devaiation_size()
Definition: Tree_Schema.hpp:89
libyang::Schema_Node_Inout
Definition: Tree_Schema.hpp:922
libyang::Schema_Node::Schema_Node_Case
friend Schema_Node_Case
Definition: Tree_Schema.hpp:593
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:2090
LYS_INPUT
@ LYS_INPUT
Definition: tree_schema.h:248
lys_submodule
Submodule schema node structure that can be included into a YANG module.
Definition: tree_schema.h:737
libyang::Type_Info_Dec64
Definition: Tree_Schema.hpp:248
lys_module::ref
const char * ref
Definition: tree_schema.h:679
LYS_DEVIATE_TYPE
enum lys_deviate_type LYS_DEVIATE_TYPE
Possible deviation modifications, see RFC 6020 sec. 7.18.3.2
libyang::Submodule::deviation_size
uint8_t deviation_size()
Definition: Tree_Schema.hpp:171
libyang::Module::inc_size
uint8_t inc_size()
Definition: Tree_Schema.hpp:79
LYS_AUGMENT
@ LYS_AUGMENT
Definition: tree_schema.h:252
libyang::Submodule::contact
const char * contact()
Definition: Tree_Schema.hpp:143
lys_module::dsc
const char * dsc
Definition: tree_schema.h:678
libyang::Deviation::deviate_size
uint8_t deviate_size()
Definition: Tree_Schema.hpp:1225
lys_node
Common structure representing single YANG data statement describing.
Definition: tree_schema.h:1217
lys_type_info_lref
Container for information about leafref types (LY_TYPE_LEAFREF), used in lys_type_info.
Definition: tree_schema.h:922
lys_import
YANG import structure used to reference other schemas (modules).
Definition: tree_schema.h:1969
libyang::Deviate
Definition: Tree_Schema.hpp:1166
libyang::Schema_Node_Rpc_Action
Definition: Tree_Schema.hpp:988
libyang::Submodule::augment_size
uint8_t augment_size()
Definition: Tree_Schema.hpp:169
libyang::Schema_Node_List::unique_size
uint8_t unique_size()
Definition: Tree_Schema.hpp:777
libyang::Refine_Mod_List::min
uint32_t min()
Definition: Tree_Schema.hpp:1098
libyang::Deviation
Definition: Tree_Schema.hpp:1210
lys_ext_instance::arg_value
const char * arg_value
Definition: tree_schema.h:478
libyang::Module
classes for wrapping lys_module.
Definition: Tree_Schema.hpp:44
libyang::Refine::iffeature
std::vector< S_Iffeature > iffeature()
Definition: Tree_Schema.hpp:1151
libyang::Schema_Node::Schema_Node_Anydata
friend Schema_Node_Anydata
Definition: Tree_Schema.hpp:590
libyang::Type_Bit
Definition: Tree_Schema.hpp:202
tree_schema.h
libyang representation of data model trees.
libyang::Include
Definition: Tree_Schema.hpp:1264
libyang::Type::base
LY_DATA_TYPE base()
Definition: Tree_Schema.hpp:451
lys_ext_instance::insubstmt
uint8_t insubstmt
Definition: tree_schema.h:488
libyang::Ext_Instance::insubstmt
uint8_t insubstmt()
Definition: Tree_Schema.hpp:503
libyang::Refine_Mod::presence
const char * presence()
Definition: Tree_Schema.hpp:1114
lys_type_info_dec64
Container for information about decimal64 types (LY_TYPE_DEC64), used in lys_type_info.
Definition: tree_schema.h:855
lyext_substmt::stmt
LY_STMT stmt
Definition: tree_schema.h:444
lys_ext
YANG extension definition.
Definition: tree_schema.h:452
libyang::Schema_Node_Anydata::Schema_Node_Anydata
Schema_Node_Anydata(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:813
lys_refine
YANG uses's refine substatement structure, see RFC 6020 sec. 7.12.2
Definition: tree_schema.h:1885
libyang::Schema_Node::Schema_Node_Rpc_Action
friend Schema_Node_Rpc_Action
Definition: Tree_Schema.hpp:598
libyang::Context
class for wrapping ly_ctx.
Definition: Libyang.hpp:43
libyang::Type_Info_Lref::req
int8_t req()
Definition: Tree_Schema.hpp:367
libyang::Type_Bit::dsc
const char * dsc()
Definition: Tree_Schema.hpp:211
libyang::Ext_Instance::def
S_Ext def()
Definition: Tree_Schema.hpp:511
lys_type_info_lref::path
const char * path
Definition: tree_schema.h:923
libyang::Ident::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1463
libyang::Tpdf::name
const char * name()
Definition: Tree_Schema.hpp:1315
lys_restr::eapptag
const char * eapptag
Definition: tree_schema.h:2066
lys_type_info_dec64::div
uint64_t div
Definition: tree_schema.h:862
libyang::Refine
Definition: Tree_Schema.hpp:1124
libyang::Unique::expr
std::vector< std::string > expr()
Definition: Tree_Schema.hpp:1351
libyang::Schema_Node_Container::Schema_Node_Container
Schema_Node_Container(S_Schema_Node derived)
Definition: Tree_Schema.hpp:608
libyang::Set
class for wrapping ly_set.
Definition: Libyang.hpp:186
libyang::Type::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:453
libyang::Include::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1277
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:914
lys_ext::ref
const char * ref
Definition: tree_schema.h:455
libyang::Feature::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1381
lys_module::filepath
const char * filepath
Definition: tree_schema.h:682
libyang::Module::~Module
~Module()
Definition: Tree_Schema.cpp:35
libyang::Schema_Node_Leaflist::units
const char * units()
Definition: Tree_Schema.hpp:737
libyang::Submodule::ident_size
uint8_t ident_size()
Definition: Tree_Schema.hpp:163
lys_type_info_union
Container for information about union types (LY_TYPE_UNION), used in lys_type_info.
Definition: tree_schema.h:955
libyang::Ext_Instance
Definition: Tree_Schema.hpp:487
libyang::Type_Info_Lref
Definition: Tree_Schema.hpp:356
libyang::Schema_Node_Leaflist::child
S_Schema_Node child() override
Definition: Tree_Schema.hpp:744
lys_module::org
const char * org
Definition: tree_schema.h:680
lys_unique::trg_type
uint8_t trg_type
Definition: tree_schema.h:2033
libyang::Deviate::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1179
libyang::Tpdf::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1323
libyang::When::ref
const char * ref()
Definition: Tree_Schema.hpp:1431
libyang::Revision::date
char * date()
Definition: Tree_Schema.hpp:1295
libyang::Deviation::ref
const char * ref()
Definition: Tree_Schema.hpp:1221
libyang::Tpdf::padding_iffsize
uint8_t padding_iffsize()
Definition: Tree_Schema.hpp:1325
libyang::Unique::trg_type
uint8_t trg_type()
Definition: Tree_Schema.hpp:1355
libyang::Ext::name
const char * name()
Definition: Tree_Schema.hpp:1070
libyang::Feature::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1371
lys_ext_instance::flags
uint16_t flags
Definition: tree_schema.h:479
lys_module::deviated
uint8_t deviated
Definition: tree_schema.h:688
lys_iffeature
Compiled if-feature expression structure.
Definition: tree_schema.h:1078
libyang::Ext_Instance::parent_type
uint8_t parent_type()
Definition: Tree_Schema.hpp:505
libyang::Revision::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1299
lys_refine::dflt_size
uint8_t dflt_size
Definition: tree_schema.h:1898
lys_ext_instance::ext_type
uint8_t ext_type
Definition: tree_schema.h:492
libyang::Deviate::unique_size
uint8_t unique_size()
Definition: Tree_Schema.hpp:1187
libyang::Refine::target_type
uint16_t target_type()
Definition: Tree_Schema.hpp:1143
libyang::Type_Info_Enums::count
unsigned int count()
Definition: Tree_Schema.hpp:305
libyang::Deviate::units
const char * units()
Definition: Tree_Schema.hpp:1199
LY_STMT_CARD
LY_STMT_CARD
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:382
libyang::Module::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:83
LYS_OUTPUT
@ LYS_OUTPUT
Definition: tree_schema.h:249
lyd_validate_value
int lyd_validate_value(struct lys_node *node, const char *value)
Check restrictions applicable to the particular leaf/leaf-list on the given string value.
libyang::Schema_Node_List::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:773
lys_node_leaflist
Schema leaf-list node structure.
Definition: tree_schema.h:1406
libyang::Ext_Instance::insubstmt_index
uint8_t insubstmt_index()
Definition: Tree_Schema.hpp:501
libyang::Schema_Node::Schema_Node_Augment
friend Schema_Node_Augment
Definition: Tree_Schema.hpp:597
libyang::Schema_Node::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:538
libyang::Schema_Node_Container::presence
const char * presence()
Definition: Tree_Schema.hpp:631
libyang::Ident::ref
const char * ref()
Definition: Tree_Schema.hpp:1453
libyang::Schema_Node::name
const char * name()
Definition: Tree_Schema.hpp:530
lys_module::implemented
uint8_t implemented
Definition: tree_schema.h:693
libyang::Include::submodule
S_Submodule submodule()
Definition: Tree_Schema.hpp:1271
libyang::Import::rev
char * rev()
Definition: Tree_Schema.hpp:1249
libyang::Schema_Node_Augment
Definition: Tree_Schema.hpp:1017
libyang::Schema_Node_List::min
uint32_t min()
Definition: Tree_Schema.hpp:789
libyang::Deviate::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:1185
lyext_substmt::offset
size_t offset
Definition: tree_schema.h:445
libyang::Schema_Node::validate_value
int validate_value(const char *value)
Definition: Tree_Schema.hpp:561
lys_ext_instance
Generic extension instance structure.
Definition: tree_schema.h:472
lys_type_info_str
Container for information about string types (LY_TYPE_STRING), used in lys_type_info.
Definition: tree_schema.h:935
LYS_NOTIF
@ LYS_NOTIF
Definition: tree_schema.h:246
libyang::Type_Enum::name
const char * name()
Definition: Tree_Schema.hpp:273
libyang::Schema_Node_Case::Schema_Node_Case
Schema_Node_Case(S_Schema_Node derived)
Definition: Tree_Schema.hpp:898
lys_type_info
Union for holding type-specific information in lys_type.
Definition: tree_schema.h:965
libyang::Feature
Definition: Tree_Schema.hpp:1362
libyang::Type_Bit::pos
uint32_t pos()
Definition: Tree_Schema.hpp:221
LYS_LEAFLIST
@ LYS_LEAFLIST
Definition: tree_schema.h:242
libyang::Schema_Node_Rpc_Action::Schema_Node_Rpc_Action
Schema_Node_Rpc_Action(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:1001
libyang::Schema_Node_Uses::Schema_Node_Uses
Schema_Node_Uses(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:844
libyang::Schema_Node::flags
uint16_t flags()
Definition: Tree_Schema.hpp:536
lys_type_info_inst
Container for information about instance-identifier types (LY_TYPE_INST), used in lys_type_info.
Definition: tree_schema.h:903
libyang::Schema_Node_Grp::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:886
lys_node_notif
Schema notification node structure.
Definition: tree_schema.h:1738
lys_refine_mod_list::max
uint32_t max
Definition: tree_schema.h:1870
libyang::Module::filepath
const char * filepath()
Definition: Tree_Schema.hpp:63
libyang::Tpdf::has_union_leafref
uint8_t has_union_leafref()
Definition: Tree_Schema.hpp:1327
libyang::Module::feature_enable
int feature_enable(const char *feature)
Definition: Tree_Schema.cpp:80
lys_when::cond
const char * cond
Definition: tree_schema.h:2077
libyang::Ext::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1076
libyang::Tpdf::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1329
libyang::Schema_Node_Augment::Schema_Node_Augment
Schema_Node_Augment(S_Schema_Node derived)
Definition: Tree_Schema.hpp:1020
libyang::Module::rev
S_Revision rev()
Definition: Tree_Schema.cpp:36
lys_type_bit::pos
uint32_t pos
Definition: tree_schema.h:838
libyang::Schema_Node_Notif::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:977
lys_module::ident_size
uint16_t ident_size
Definition: tree_schema.h:704
libyang::Module::data_instantiables
std::vector< S_Schema_Node > data_instantiables(int options)
Definition: Tree_Schema.cpp:42
libyang::Module::deviated
uint8_t deviated()
Definition: Tree_Schema.hpp:69
libyang::Schema_Node_Uses::Schema_Node_Uses
Schema_Node_Uses(S_Schema_Node derived)
Definition: Tree_Schema.hpp:834
lys_refine_mod::presence
const char * presence
Definition: tree_schema.h:1877
lys_deviate::mod
LYS_DEVIATE_TYPE mod
Definition: tree_schema.h:1927
libyang::Refine::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1139
libyang::Module::disabled
uint8_t disabled()
Definition: Tree_Schema.hpp:71
libyang::Refine::ref
const char * ref()
Definition: Tree_Schema.hpp:1135
libyang::Schema_Node::Schema_Node_Choice
friend Schema_Node_Choice
Definition: Tree_Schema.hpp:586
libyang::Module::ns
const char * ns()
Definition: Tree_Schema.hpp:95
libyang::Schema_Node_Container::Schema_Node_Container
Schema_Node_Container(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:618
LYS_RPC
@ LYS_RPC
Definition: tree_schema.h:247
libyang::Schema_Node_Notif::Schema_Node_Notif
Schema_Node_Notif(S_Schema_Node derived)
Definition: Tree_Schema.hpp:958
libyang::Submodule::dsc
const char * dsc()
Definition: Tree_Schema.hpp:137
libyang::Schema_Node_Leaf::units
const char * units()
Definition: Tree_Schema.hpp:693
libyang::Schema_Node_List
Definition: Tree_Schema.hpp:751
lys_node_inout
RPC input and output node structure.
Definition: tree_schema.h:1700
libyang::Refine::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:1145
libyang::When::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1429
libyang::Schema_Node_Choice::Schema_Node_Choice
Schema_Node_Choice(S_Schema_Node derived)
Definition: Tree_Schema.hpp:641
lys_node_list
Schema list node structure.
Definition: tree_schema.h:1462
libyang::Tpdf::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1317
LYS_ANYXML
@ LYS_ANYXML
Definition: tree_schema.h:244
libyang::Schema_Node_Leaflist::dflt_size
uint8_t dflt_size()
Definition: Tree_Schema.hpp:725
libyang::Restr::eapptag
const char * eapptag()
Definition: Tree_Schema.hpp:1407
LYS_ACTION
@ LYS_ACTION
Definition: tree_schema.h:253
libyang::Iffeature::expr
uint8_t * expr()
Definition: Tree_Schema.hpp:474
libyang::Type_Bit::name
const char * name()
Definition: Tree_Schema.hpp:209
lys_restr::expr
const char * expr
Definition: tree_schema.h:2061
libyang::Feature::name
const char * name()
Definition: Tree_Schema.hpp:1369