libyang  1.0.184
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  friend Submodule;
115 
116 private:
117  struct lys_module *module;
118  S_Deleter deleter;
119 };
120 
126 {
127 public:
129  Submodule(struct lys_submodule *submodule, S_Deleter deleter);
131  Submodule(S_Module module);
132  ~Submodule();
134  S_Context ctx() LY_NEW(submodule, ctx, Context);
136  const char *name() {return submodule->name;};
138  const char *prefix() {return submodule->prefix;};
140  const char *dsc() {return submodule->dsc;};
142  const char *ref() {return submodule->ref;};
144  const char *org() {return submodule->org;};
146  const char *contact() {return submodule->contact;};
148  const char *filepath() {return submodule->filepath;};
150  uint8_t type() {return submodule->type;};
152  uint8_t version() {return submodule->version;};
154  uint8_t deviated() {return submodule->deviated;};
156  uint8_t disabled() {return submodule->disabled;};
158  uint8_t implemented() {return submodule->implemented;};
160  uint8_t rev_size() {return submodule->rev_size;};
162  uint8_t imp_size() {return submodule->imp_size;};
164  uint8_t inc_size() {return submodule->inc_size;};
166  uint8_t ident_size() {return submodule->ident_size;};
168  uint8_t tpdf_size() {return submodule->tpdf_size;};
170  uint8_t features_size() {return submodule->features_size;};
172  uint8_t augment_size() {return submodule->augment_size;};
174  uint8_t deviation_size() {return submodule->deviation_size;};
176  uint8_t extensions_size() {return submodule->extensions_size;};
178  uint8_t ext_size() {return submodule->ext_size;};
180  S_Revision rev();
182  std::vector<S_Deviation> deviation();
184  S_Module belongsto() LY_NEW(submodule, belongsto, Module);
185 
186 private:
187  struct lys_submodule *submodule;
188  S_Deleter deleter;
189 };
190 
192 {
193 public:
195  Type_Info_Binary(struct lys_type_info_binary *info_binary, S_Deleter deleter);
196  ~Type_Info_Binary();
198  S_Restr length();
199 
200 private:
201  lys_type_info_binary *info_binary;
202  S_Deleter deleter;
203 };
204 
205 class Type_Bit
206 {
207 public:
209  Type_Bit(struct lys_type_bit *info_bit, S_Deleter deleter);
210  ~Type_Bit();
212  const char *name() {return info_bit->name;};
214  const char *dsc() {return info_bit->dsc;};
216  const char *ref() {return info_bit->ref;};
218  uint16_t flags() {return info_bit->flags;};
220  uint8_t ext_size() {return info_bit->ext_size;};
222  uint8_t iffeature_size() {return info_bit->iffeature_size;};
224  uint32_t pos() {return info_bit->pos;};
226  std::vector<S_Ext_Instance> ext();
228  std::vector<S_Iffeature> iffeature();
229 
230 private:
231  lys_type_bit *info_bit;
232  S_Deleter deleter;
233 };
234 
236 {
237 public:
239  Type_Info_Bits(struct lys_type_info_bits *info_bits, S_Deleter deleter);
240  ~Type_Info_Bits();
242  std::vector<S_Type_Bit> bit();
244  unsigned int count() {return info_bits->count;};
245 
246 private:
247  lys_type_info_bits *info_bits;
248  S_Deleter deleter;
249 };
250 
252 {
253 public:
255  Type_Info_Dec64(struct lys_type_info_dec64 *info_dec64, S_Deleter deleter);
256  ~Type_Info_Dec64();
258  S_Restr range();
260  uint8_t dig() {return info_dec64->dig;}
262  uint8_t div() {return info_dec64->div;}
263 
264 private:
265  lys_type_info_dec64 *info_dec64;
266  S_Deleter deleter;
267 };
268 
270 {
271 public:
273  Type_Enum(struct lys_type_enum *info_enum, S_Deleter deleter);
274  ~Type_Enum();
276  const char *name() {return info_enum->name;};
278  const char *dsc() {return info_enum->dsc;};
280  const char *ref() {return info_enum->ref;};
282  uint16_t flags() {return info_enum->flags;};
284  uint8_t ext_size() {return info_enum->ext_size;};
286  uint8_t iffeature_size() {return info_enum->iffeature_size;};
288  int32_t value() {return info_enum->value;};
290  std::vector<S_Ext_Instance> ext();
292  std::vector<S_Iffeature> iffeature();
293 
294 private:
295  lys_type_enum *info_enum;
296  S_Deleter deleter;
297 };
298 
300 {
301 public:
303  Type_Info_Enums(struct lys_type_info_enums *info_enums, S_Deleter deleter);
304  ~Type_Info_Enums();
306  std::vector<S_Type_Enum> enm();
308  unsigned int count() {return info_enums->count;};
309 
310 private:
311  lys_type_info_enums *info_enums;
312  S_Deleter deleter;
313 };
314 
316 {
317 public:
319  Type_Info_Ident(struct lys_type_info_ident *info_ident, S_Deleter deleter);
320  ~Type_Info_Ident();
322  std::vector<S_Ident> ref();
324  int count() {return info_ident->count;};
325 
326 private:
327  lys_type_info_ident *info_ident;
328  S_Deleter deleter;
329 };
330 
332 {
333 public:
335  Type_Info_Inst(struct lys_type_info_inst *info_inst, S_Deleter deleter);
336  ~Type_Info_Inst();
338  int8_t req() {return info_inst->req;};
339 
340 private:
341  lys_type_info_inst *info_inst;
342  S_Deleter deleter;
343 };
344 
346 {
347 public:
349  Type_Info_Num(struct lys_type_info_num *info_num, S_Deleter deleter);
350  ~Type_Info_Num();
352  S_Restr range();
353 
354 private:
355  lys_type_info_num *info_num;
356  S_Deleter deleter;
357 };
358 
360 {
361 public:
363  Type_Info_Lref(struct lys_type_info_lref *info_lref, S_Deleter deleter);
364  ~Type_Info_Lref();
366  const char *path() {return info_lref->path;};
368  S_Schema_Node_Leaf target();
370  int8_t req() {return info_lref->req;};
371 
372 private:
373  lys_type_info_lref *info_lref;
374  S_Deleter deleter;
375 };
376 
378 {
379 public:
381  Type_Info_Str(struct lys_type_info_str *info_str, S_Deleter deleter);
382  ~Type_Info_Str();
384  S_Restr length();
386  S_Restr patterns();
388  int pat_count() {return info_str->pat_count;};
389 
390 private:
391  lys_type_info_str *info_str;
392  S_Deleter deleter;
393 };
394 
396 {
397 public:
399  Type_Info_Union(struct lys_type_info_union *info_union, S_Deleter deleter);
400  ~Type_Info_Union();
402  std::vector<S_Type> types();
404  int count() {return info_union->count;};
406  int has_ptr_type() {return info_union->has_ptr_type;};
407 
408 private:
409  lys_type_info_union *info_union;
410  S_Deleter deleter;
411 };
412 
414 {
415 public:
417  Type_Info(union lys_type_info info, LY_DATA_TYPE *type, uint8_t flags, S_Deleter deleter);
418  ~Type_Info();
420  S_Type_Info_Binary binary();
422  S_Type_Info_Bits bits();
424  S_Type_Info_Dec64 dec64();
426  S_Type_Info_Enums enums();
428  S_Type_Info_Ident ident();
430  S_Type_Info_Inst inst();
432  S_Type_Info_Num num();
434  S_Type_Info_Lref lref();
436  S_Type_Info_Str str();
438  S_Type_Info_Union uni();
439 
440 private:
441  union lys_type_info info;
443  uint8_t flags;
444  S_Deleter deleter;
445 };
446 
447 class Type
448 {
449 public:
451  Type(struct lys_type *type, S_Deleter deleter);
452  ~Type();
454  LY_DATA_TYPE base() {return type->base;};
456  uint8_t ext_size() {return type->ext_size;};
458  std::vector<S_Ext_Instance> ext();
460  S_Tpdf der();
462  S_Tpdf parent();
464  S_Type_Info info();
465 
466 private:
467  struct lys_type *type;
468  S_Deleter deleter;
469 };
470 
471 class Iffeature {
472 public:
474  Iffeature(struct lys_iffeature *iffeature, S_Deleter deleter);
475  ~Iffeature();
477  uint8_t *expr() {return iffeature->expr;};
479  uint8_t ext_size() {return iffeature->ext_size;};
481  std::vector<S_Ext_Instance> ext();
483  int value();
484 
485 private:
486  struct lys_iffeature *iffeature;
487  S_Deleter deleter;
488 };
489 
491 {
492 public:
494  Ext_Instance(lys_ext_instance *ext_instance, S_Deleter deleter);
495  ~Ext_Instance();
496  //TODO void *parent();
498  const char *arg_value() {return ext_instance->arg_value;};
500  uint16_t flags() {return ext_instance->flags;};
502  uint8_t ext_size() {return ext_instance->ext_size;};
504  uint8_t insubstmt_index() {return ext_instance->insubstmt_index;};
506  uint8_t insubstmt() {return ext_instance->insubstmt;};
508  uint8_t parent_type() {return ext_instance->parent_type;};
510  uint8_t ext_type() {return ext_instance->ext_type;};
512  std::vector<S_Ext_Instance> ext();
514  S_Ext def() LY_NEW(ext_instance, def, Ext);
516  void *priv() {return ext_instance->priv;};
518  S_Module module() LY_NEW(ext_instance, module, Module);
520  LYS_NODE nodetype() {return ext_instance->nodetype;};
521 private:
522  struct lys_ext_instance *ext_instance;
523  S_Deleter deleter;
524 };
525 
527 {
528 public:
530  Schema_Node(lys_node *node, S_Deleter deleter);
531  virtual ~Schema_Node();
533  const char *name() {return node->name;};
535  const char *dsc() {return node->dsc;};
537  const char *ref() {return node->ref;};
539  uint16_t flags() {return node->flags;};
541  uint8_t ext_size() {return node->ext_size;};
543  uint8_t iffeature_size() {return node->iffeature_size;};
545  std::vector<S_Ext_Instance> ext();
547  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(node, iffeature, iffeature_size, Iffeature);
549  S_Module module();
551  LYS_NODE nodetype() {return node->nodetype;};
553  virtual S_Schema_Node parent();
555  virtual S_Schema_Node child();
557  virtual S_Schema_Node next();
559  virtual S_Schema_Node prev();
560 
562  std::string path(int options = 0);
564  int validate_value(const char *value) {return lyd_validate_value(node, value);};
566  std::vector<S_Schema_Node> child_instantiables(int options);
568  S_Set find_path(const char *path);
570  S_Set xpath_atomize(enum lyxp_node_type ctx_node_type, const char *expr, int options);
572  S_Set xpath_atomize(int options);
573  // void *priv;
574 
575  /* emulate TREE macro's */
577  std::vector<S_Schema_Node> tree_for();
579  std::vector<S_Schema_Node> tree_dfs();
580 
581  /* SWIG can not access private variables so it needs public getters */
582  struct lys_node *swig_node() {return node;};
583  S_Deleter swig_deleter() {return deleter;};
584 
585  friend Set;
586  friend Data_Node;
587  friend Context;
602 
603 private:
604  struct lys_node *node;
605  S_Deleter deleter;
606 };
607 
609 {
610 public:
611  Schema_Node_Container(S_Schema_Node derived):
612  Schema_Node(derived->node, derived->deleter),
613  node(derived->node),
614  deleter(derived->deleter)
615  {
616  if (derived->node->nodetype != LYS_CONTAINER) {
617  throw std::invalid_argument("Type must be LYS_CONTAINER");
618  }
619  };
621  Schema_Node_Container(struct lys_node *node, S_Deleter deleter):
622  Schema_Node(node, deleter),
623  node(node),
624  deleter(deleter)
625  {};
628  S_When when();
630  S_Restr must();
632  S_Tpdf ptdf();
634  const char *presence() {return ((struct lys_node_container *) node)->presence;};
635 
636 private:
637  struct lys_node *node;
638  S_Deleter deleter;
639 };
640 
642 {
643 public:
644  Schema_Node_Choice(S_Schema_Node derived):
645  Schema_Node(derived->node, derived->deleter),
646  node(derived->node),
647  deleter(derived->deleter)
648  {
649  if (derived->node->nodetype != LYS_CHOICE) {
650  throw std::invalid_argument("Type must be LYS_CHOICE");
651  }
652  };
654  Schema_Node_Choice(struct lys_node *node, S_Deleter deleter):
655  Schema_Node(node, deleter),
656  node(node),
657  deleter(deleter)
658  {};
661  S_When when();
663  S_Schema_Node dflt();
664 
665 private:
666  struct lys_node *node;
667  S_Deleter deleter;
668 };
669 
671 {
672 public:
673  Schema_Node_Leaf(S_Schema_Node derived):
674  Schema_Node(derived->node, derived->deleter),
675  node(derived->node),
676  deleter(derived->deleter)
677  {
678  if (derived->node->nodetype != LYS_LEAF) {
679  throw std::invalid_argument("Type must be LYS_LEAF");
680  }
681  };
683  Schema_Node_Leaf(struct lys_node *node, S_Deleter deleter):
684  Schema_Node(node, deleter),
685  node(node),
686  deleter(deleter)
687  {};
688  ~Schema_Node_Leaf();
690  S_When when();
692  S_Type type();
694  const char *units() {return ((struct lys_node_leaf *)node)->units;};
696  const char *dflt() {return ((struct lys_node_leaf *)node)->dflt;};
697  S_Schema_Node child() override {return nullptr;};
699  S_Schema_Node_List is_key();
700 
701 private:
702  struct lys_node *node;
703  S_Deleter deleter;
704 };
705 
707 {
708 public:
709  Schema_Node_Leaflist(S_Schema_Node derived):
710  Schema_Node(derived->node, derived->deleter),
711  node(derived->node),
712  deleter(derived->deleter)
713  {
714  if (derived->node->nodetype != LYS_LEAFLIST) {
715  throw std::invalid_argument("Type must be LYS_LEAFLIST");
716  }
717  };
719  Schema_Node_Leaflist(struct lys_node *node, S_Deleter deleter):
720  Schema_Node(node, deleter),
721  node(node),
722  deleter(deleter)
723  {};
726  uint8_t dflt_size() {return ((struct lys_node_leaflist *)node)->dflt_size;};
728  uint8_t must_size() {return ((struct lys_node_leaflist *)node)->must_size;};
730  S_When when();
732  std::vector<S_Restr> must();
734  S_Type type();
736  const char *units() {return ((struct lys_node_leaflist *)node)->units;};
738  std::vector<std::string> dflt();
740  uint32_t min() {return ((struct lys_node_leaflist *)node)->min;};
742  uint32_t max() {return ((struct lys_node_leaflist *)node)->max;};
743  S_Schema_Node child() override {return nullptr;};
744 
745 private:
746  struct lys_node *node;
747  S_Deleter deleter;
748 };
749 
751 {
752 public:
753  Schema_Node_List(S_Schema_Node derived):
754  Schema_Node(derived->node, derived->deleter),
755  node(derived->node),
756  deleter(derived->deleter)
757  {
758  if (derived->node->nodetype != LYS_LIST) {
759  throw std::invalid_argument("Type must be LYS_LIST");
760  }
761  };
763  Schema_Node_List(struct lys_node *node, S_Deleter deleter):
764  Schema_Node(node, deleter),
765  node(node),
766  deleter(deleter)
767  {};
768  ~Schema_Node_List();
770  uint8_t must_size() {return ((struct lys_node_list *)node)->must_size;};
772  uint8_t tpdf_size() {return ((struct lys_node_list *)node)->tpdf_size;};
774  uint8_t keys_size() {return ((struct lys_node_list *)node)->keys_size;};
776  uint8_t unique_size() {return ((struct lys_node_list *)node)->unique_size;};
778  S_When when();
780  std::vector<S_Restr> must();
782  std::vector<S_Tpdf> tpdf();
784  std::vector<S_Schema_Node_Leaf> keys();
786  std::vector<S_Unique> unique();
788  uint32_t min() {return ((struct lys_node_list *)node)->min;};
790  uint32_t max() {return ((struct lys_node_list *)node)->max;};
792  const char *keys_str() {return ((struct lys_node_list *)node)->keys_str;};
793 
794 private:
795  struct lys_node *node;
796  S_Deleter deleter;
797 };
798 
800 {
801 public:
802  Schema_Node_Anydata(S_Schema_Node derived):
803  Schema_Node(derived->node, derived->deleter),
804  node(derived->node),
805  deleter(derived->deleter)
806  {
807  if (derived->node->nodetype != LYS_ANYDATA && derived->node->nodetype != LYS_ANYXML) {
808  throw std::invalid_argument("Type must be LYS_ANYDATA or LYS_ANYXML");
809  }
810  };
812  Schema_Node_Anydata(struct lys_node *node, S_Deleter deleter):
813  Schema_Node(node, deleter),
814  node(node),
815  deleter(deleter)
816  {};
819  uint8_t must_size() {return ((struct lys_node_list *)node)->must_size;};
821  S_When when();
823  std::vector<S_Restr> must();
824 
825 private:
826  struct lys_node *node;
827  S_Deleter deleter;
828 };
829 
831 {
832 public:
833  Schema_Node_Uses(S_Schema_Node derived):
834  Schema_Node(derived->node, derived->deleter),
835  node(derived->node),
836  deleter(derived->deleter)
837  {
838  if (derived->node->nodetype != LYS_USES) {
839  throw std::invalid_argument("Type must be LYS_USES");
840  }
841  };
843  Schema_Node_Uses(struct lys_node *node, S_Deleter deleter):
844  Schema_Node(node, deleter),
845  node(node),
846  deleter(deleter)
847  {};
848  ~Schema_Node_Uses();
850  uint8_t augment_size() {return ((struct lys_node_uses *)node)->augment_size;};
852  S_When when();
854  std::vector<S_Refine> refine();
856  std::vector<S_Schema_Node_Augment> augment();
858  S_Schema_Node_Grp grp();
859 
860 private:
861  struct lys_node *node;
862  S_Deleter deleter;
863 };
864 
866 {
867 public:
868  Schema_Node_Grp(S_Schema_Node derived):
869  Schema_Node(derived->node, derived->deleter),
870  node(derived->node),
871  deleter(derived->deleter)
872  {
873  if (derived->node->nodetype != LYS_GROUPING) {
874  throw std::invalid_argument("Type must be LYS_GROUPING");
875  }
876  };
878  Schema_Node_Grp(struct lys_node *node, S_Deleter deleter):
879  Schema_Node(node, deleter),
880  node(node),
881  deleter(deleter)
882  {};
883  ~Schema_Node_Grp();
885  uint8_t tpdf_size() {return ((struct lys_node_grp *)node)->tpdf_size;};
887  std::vector<S_Tpdf> tpdf();
888 
889 private:
890  struct lys_node *node;
891  S_Deleter deleter;
892 };
893 
895 {
896 public:
897  Schema_Node_Case(S_Schema_Node derived):
898  Schema_Node(derived->node, derived->deleter),
899  node(derived->node),
900  deleter(derived->deleter)
901  {
902  if (derived->node->nodetype != LYS_CASE) {
903  throw std::invalid_argument("Type must be LYS_CASE");
904  }
905  };
907  Schema_Node_Case(struct lys_node *node, S_Deleter deleter):
908  Schema_Node(node, deleter),
909  node(node),
910  deleter(deleter)
911  {};
912  ~Schema_Node_Case();
914  S_When when();
915 
916 private:
917  struct lys_node *node;
918  S_Deleter deleter;
919 };
920 
922 {
923 public:
924  Schema_Node_Inout(S_Schema_Node derived):
925  Schema_Node(derived->node, derived->deleter),
926  node(derived->node),
927  deleter(derived->deleter)
928  {
929  if (derived->node->nodetype != LYS_INPUT && derived->node->nodetype != LYS_OUTPUT) {
930  throw std::invalid_argument("Type must be LYS_INOUT or LYS_OUTPUT");
931  }
932  };
934  Schema_Node_Inout(struct lys_node *node, S_Deleter deleter):
935  Schema_Node(node, deleter),
936  node(node),
937  deleter(deleter)
938  {};
941  uint8_t tpdf_size() {return ((struct lys_node_inout *)node)->tpdf_size;};
943  uint8_t must_size() {return ((struct lys_node_inout *)node)->must_size;};
945  std::vector<S_Tpdf> tpdf();
947  std::vector<S_Restr> must();
948 
949 private:
950  struct lys_node *node;
951  S_Deleter deleter;
952 };
953 
955 {
956 public:
957  Schema_Node_Notif(S_Schema_Node derived):
958  Schema_Node(derived->node, derived->deleter),
959  node(derived->node),
960  deleter(derived->deleter)
961  {
962  if (derived->node->nodetype != LYS_NOTIF) {
963  throw std::invalid_argument("Type must be LYS_NOTIF");
964  }
965  };
967  Schema_Node_Notif(struct lys_node *node, S_Deleter deleter):
968  Schema_Node(node, deleter),
969  node(node),
970  deleter(deleter)
971  {};
974  uint8_t tpdf_size() {return ((struct lys_node_notif *)node)->tpdf_size;};
976  uint8_t must_size() {return ((struct lys_node_notif *)node)->must_size;};
978  std::vector<S_Tpdf> tpdf();
980  std::vector<S_Restr> must();
981 
982 private:
983  struct lys_node *node;
984  S_Deleter deleter;
985 };
986 
988 {
989 public:
990  Schema_Node_Rpc_Action(S_Schema_Node derived):
991  Schema_Node(derived->node, derived->deleter),
992  node(derived->node),
993  deleter(derived->deleter)
994  {
995  if (derived->node->nodetype != LYS_ACTION && derived->node->nodetype != LYS_RPC) {
996  throw std::invalid_argument("Type must be LYS_ACTION or LYS_RPC");
997  }
998  };
1000  Schema_Node_Rpc_Action(struct lys_node *node, S_Deleter deleter):
1001  Schema_Node(node, deleter),
1002  node(node),
1003  deleter(deleter)
1004  {};
1007  uint8_t tpdf_size() {return ((struct lys_node_rpc_action *)node)->tpdf_size;};
1009  std::vector<S_Tpdf> tpdf();
1010 
1011 private:
1012  struct lys_node *node;
1013  S_Deleter deleter;
1014 };
1015 
1017 {
1018 public:
1019  Schema_Node_Augment(S_Schema_Node derived):
1020  Schema_Node(derived->node, derived->deleter),
1021  node(derived->node),
1022  deleter(derived->deleter)
1023  {
1024  if (derived->node->nodetype != LYS_AUGMENT) {
1025  throw std::invalid_argument("Type must be LYS_AUGMENT");
1026  }
1027  };
1029  Schema_Node_Augment(struct lys_node *node, S_Deleter deleter):
1030  Schema_Node(node, deleter),
1031  node(node),
1032  deleter(deleter)
1033  {};
1036  S_When when();
1038  S_Schema_Node target() LY_NEW_CASTED(lys_node_augment, node, target, Schema_Node);
1039 
1040 private:
1041  struct lys_node *node;
1042  S_Deleter deleter;
1043 };
1044 
1045 class Substmt
1046 {
1047 public:
1049  Substmt(struct lyext_substmt *substmt, S_Deleter deleter);
1050  ~Substmt();
1052  LY_STMT stmt() {return substmt->stmt;};
1054  size_t offset() {return substmt->offset;};
1056  LY_STMT_CARD cardinality() {return substmt->cardinality;};
1057 private:
1058  struct lyext_substmt *substmt;
1059  S_Deleter deleter;
1060 };
1061 
1062 class Ext
1063 {
1064 public:
1066  Ext(struct lys_ext *ext, S_Deleter deleter);
1067  ~Ext();
1069  const char *name() {return ext->name;};
1071  const char *dsc() {return ext->dsc;};
1073  const char *ref() {return ext->ref;};
1075  uint16_t flags() {return ext->flags;};
1077  uint8_t ext_size() {return ext->ext_size;};
1079  std::vector<S_Ext_Instance> ext_instance();
1081  const char *argument() {return ext->argument;};
1083  S_Module module();
1084  //struct lyext_plugin *plugin;
1085 private:
1086  struct lys_ext *ext;
1087  S_Deleter deleter;
1088 };
1089 
1091 {
1092 public:
1094  Refine_Mod_List(struct lys_refine_mod_list *list, S_Deleter deleter);
1095  ~Refine_Mod_List();
1097  uint32_t min() {return list->min;};
1099  uint32_t max() {return list->max;};
1100 
1101 private:
1102  struct lys_refine_mod_list *list;
1103  S_Deleter deleter;
1104 };
1105 
1107 {
1108 public:
1110  Refine_Mod(union lys_refine_mod mod, uint16_t target_type, S_Deleter deleter);
1111  ~Refine_Mod();
1113  const char *presence() {return target_type == LYS_CONTAINER ? mod.presence : nullptr;};
1115  S_Refine_Mod_List list();
1116 
1117 private:
1118  union lys_refine_mod mod;
1119  uint16_t target_type;
1120  S_Deleter deleter;
1121 };
1122 
1123 class Refine
1124 {
1125 public:
1127  Refine(struct lys_refine *refine, S_Deleter deleter);
1128  ~Refine();
1130  const char *target_name() {return refine->target_name;};
1132  const char *dsc() {return refine->dsc;};
1134  const char *ref() {return refine->ref;};
1136  uint16_t flags() {return refine->flags;};
1138  uint8_t ext_size() {return refine->ext_size;};
1140  uint8_t iffeature_size() {return refine->iffeature_size;};
1142  uint16_t target_type() {return refine->target_type;};
1144  uint8_t must_size() {return refine->must_size;};
1146  uint8_t dflt_size() {return refine->dflt_size;};
1148  std::vector<S_Ext_Instance> ext();
1150  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(refine, iffeature, iffeature_size, Iffeature);
1152  S_Module module();
1154  std::vector<S_Restr> must();
1156  std::vector<std::string> dflt() LY_NEW_STRING_LIST(refine, dflt, dflt_size);
1158  S_Refine_Mod mod();
1159 
1160 private:
1161  struct lys_refine *refine;
1162  S_Deleter deleter;
1163 };
1164 
1165 class Deviate
1166 {
1167 public:
1169  Deviate(struct lys_deviate *deviate, S_Deleter deleter);
1170  ~Deviate();
1172  LYS_DEVIATE_TYPE mod() {return deviate->mod;};
1174  uint8_t flags() {return deviate->flags;};
1176  uint8_t dflt_size() {return deviate->dflt_size;};
1178  uint8_t ext_size() {return deviate->ext_size;};
1180  uint8_t min_set() {return deviate->min_set;};
1182  uint8_t max_set() {return deviate->max_set;};
1184  uint8_t must_size() {return deviate->must_size;};
1186  uint8_t unique_size() {return deviate->unique_size;};
1188  uint32_t min() {return deviate->min;};
1190  uint32_t max() {return deviate->max;};
1192  S_Restr must();
1194  S_Unique unique();
1196  S_Type type();
1198  const char *units() {return deviate->units;};
1200  std::vector<std::string> dflt() LY_NEW_STRING_LIST(deviate, dflt, dflt_size);
1202  std::vector<S_Ext_Instance> ext();
1203 
1204 private:
1205  struct lys_deviate *deviate;
1206  S_Deleter deleter;
1207 };
1208 
1210 {
1211 public:
1213  Deviation(struct lys_deviation *deviation, S_Deleter deleter);
1214  ~Deviation();
1216  const char *target_name() {return deviation->target_name;};
1218  const char *dsc() {return deviation->dsc;};
1220  const char *ref() {return deviation->ref;};
1222  S_Schema_Node orig_node();
1224  uint8_t deviate_size() {return deviation->deviate_size;};
1226  uint8_t ext_size() {return deviation->ext_size;};
1228  std::vector<S_Deviate> deviate();
1230  std::vector<S_Ext_Instance> ext();
1231 
1232 private:
1233  struct lys_deviation *deviation;
1234  S_Deleter deleter;
1235 };
1236 
1237 class Import
1238 {
1239 public:
1241  Import(struct lys_import *import, S_Deleter deleter);
1242  ~Import();
1244  S_Module module() LY_NEW(import, module, Module);
1246  const char *prefix() {return import->prefix;};
1248  char *rev() {return &import->rev[0];};
1250  uint8_t ext_size() {return import->ext_size;};
1252  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(import, ext, ext_size, Ext_Instance);
1254  const char *dsc() {return import->dsc;};
1256  const char *ref() {return import->ref;};
1257 
1258 private:
1259  struct lys_import *import;
1260  S_Deleter deleter;
1261 };
1262 
1263 class Include
1264 {
1265 public:
1267  Include(struct lys_include *include, S_Deleter deleter);
1268  ~Include();
1270  S_Submodule submodule() LY_NEW(include, submodule, Submodule);
1272  char *rev() {return &include->rev[0];};
1274  uint8_t ext_size() {return include->ext_size;};
1276  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(include, ext, ext_size, Ext_Instance);
1278  const char *dsc() {return include->dsc;};
1280  const char *ref() {return include->ref;};
1281 
1282 private:
1283  struct lys_include *include;
1284  S_Deleter deleter;
1285 };
1286 
1288 {
1289 public:
1291  Revision(lys_revision *revision, S_Deleter deleter);
1292  ~Revision();
1294  char *date() {return &revision->date[0];};
1296  uint8_t ext_size() {return revision->ext_size;};
1298  const char *dsc() {return revision->dsc;};
1300  const char *ref() {return revision->ref;};
1301 
1302 private:
1303  struct lys_revision *revision;
1304  S_Deleter deleter;
1305 };
1306 
1307 class Tpdf
1308 {
1309 public:
1311  Tpdf(struct lys_tpdf *tpdf, S_Deleter deleter);
1312  ~Tpdf();
1314  const char *name() {return tpdf->name;};
1316  const char *dsc() {return tpdf->dsc;};
1318  const char *ref() {return tpdf->ref;};
1320  uint16_t flags() {return tpdf->flags;};
1322  uint8_t ext_size() {return tpdf->ext_size;};
1324  uint8_t padding_iffsize() {return tpdf->padding_iffsize;};
1326  uint8_t has_union_leafref() {return tpdf->has_union_leafref;};
1328  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(tpdf, ext, ext_size, Ext_Instance);
1330  const char *units() {return tpdf->units;};
1332  S_Module module() LY_NEW(tpdf, module, Module);
1334  S_Type type();
1336  const char *dflt() {return tpdf->dflt;};
1337 
1338 private:
1339  struct lys_tpdf *tpdf;
1340  S_Deleter deleter;
1341 };
1342 
1343 class Unique
1344 {
1345 public:
1347  Unique(struct lys_unique *unique, S_Deleter deleter);
1348  ~Unique();
1350  std::vector<std::string> expr() LY_NEW_STRING_LIST(unique, expr, expr_size);
1352  uint8_t expr_size() {return unique->expr_size;};
1354  uint8_t trg_type() {return unique->trg_type;};
1355 
1356 private:
1357  struct lys_unique *unique;
1358  S_Deleter deleter;
1359 };
1360 
1361 class Feature
1362 {
1363 public:
1365  Feature(struct lys_feature *feature, S_Deleter);
1366  ~Feature();
1368  const char *name() {return feature->name;};
1370  const char *dsc() {return feature->dsc;};
1372  const char *ref() {return feature->ref;};
1374  uint16_t flags() {return feature->flags;};
1376  uint8_t ext_size() {return feature->ext_size;};
1378  uint8_t iffeature_size() {return feature->iffeature_size;};
1380  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(feature, ext, ext_size, Ext_Instance);
1382  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(feature, iffeature, iffeature_size, Iffeature);
1384  S_Module module() LY_NEW(feature, module, Module);
1386  S_Set depfeatures() LY_NEW(feature, depfeatures, Set);
1387 
1388 private:
1389  struct lys_feature *feature;
1390  S_Deleter deleter;
1391 };
1392 
1393 class Restr
1394 {
1395 public:
1397  Restr(struct lys_restr *restr, S_Deleter deleter);
1398  ~Restr();
1400  const char *expr() {return restr->expr;};
1402  const char *dsc() {return restr->dsc;};
1404  const char *ref() {return restr->ref;};
1406  const char *eapptag() {return restr->eapptag;};
1408  const char *emsg() {return restr->emsg;};
1410  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(restr, ext, ext_size, Ext_Instance);
1412  uint8_t ext_size() {return restr->ext_size;};
1413 
1414 private:
1415  struct lys_restr *restr;
1416  S_Deleter deleter;
1417 };
1418 
1419 class When
1420 {
1421 public:
1423  When(struct lys_when *when, S_Deleter deleter = nullptr);
1424  ~When();
1426  const char *cond() {return when->cond;};
1428  const char *dsc() {return when->dsc;};
1430  const char *ref() {return when->ref;};
1432  std::vector<S_Ext_Instance> ext();
1434  uint8_t ext_size() {return when->ext_size;};
1435 
1436 private:
1437  struct lys_when *when;
1438  S_Deleter deleter;
1439 };
1440 
1441 class Ident
1442 {
1443 public:
1445  Ident(struct lys_ident *ident, S_Deleter deleter);
1446  ~Ident();
1448  const char *name() {return ident->name;};
1450  const char *dsc() {return ident->dsc;};
1452  const char *ref() {return ident->ref;};
1454  uint16_t flags() {return ident->flags;};
1456  uint8_t ext_size() {return ident->ext_size;};
1458  uint8_t iffeature_size() {return ident->iffeature_size;};
1460  uint8_t base_size() {return ident->base_size;};
1462  std::vector<S_Ext_Instance> ext() LY_NEW_P_LIST(ident, ext, ext_size, Ext_Instance);
1464  std::vector<S_Iffeature> iffeature() LY_NEW_LIST(ident, iffeature, iffeature_size, Iffeature);
1466  S_Module module() LY_NEW(ident, module, Module);
1468  std::vector<S_Ident> base();
1470  S_Set der() LY_NEW(ident, der, Set);
1471 
1472 private:
1473  struct lys_ident *ident;
1474  S_Deleter deleter;
1475 };
1476 
1479 }
1480 
1481 #endif
libyang::Revision::ref
const char * ref()
Definition: Tree_Schema.hpp:1300
libyang::Schema_Node_Choice::Schema_Node_Choice
Schema_Node_Choice(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:654
lys_module::rev_size
uint8_t rev_size
Definition: tree_schema.h:692
LYS_OUTFORMAT
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
Definition: tree_schema.h:196
libyang::Schema_Node::swig_deleter
S_Deleter swig_deleter()
Definition: Tree_Schema.hpp:583
libyang::Import::ref
const char * ref()
Definition: Tree_Schema.hpp:1256
libyang::Submodule::belongsto
S_Module belongsto()
Definition: Tree_Schema.hpp:184
libyang::Schema_Node_Leaflist::min
uint32_t min()
Definition: Tree_Schema.hpp:740
libyang::Type_Bit::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:220
LYS_CHOICE
@ LYS_CHOICE
Definition: tree_schema.h:232
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:1926
lys_restr::emsg
const char * emsg
Definition: tree_schema.h:2057
lys_tpdf::has_union_leafref
uint8_t has_union_leafref
Definition: tree_schema.h:2002
libyang::Schema_Node_Leaflist::Schema_Node_Leaflist
Schema_Node_Leaflist(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:719
libyang::Ext_Instance::module
S_Module module()
Definition: Tree_Schema.hpp:518
libyang::Feature::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1374
libyang::Type_Enum::dsc
const char * dsc()
Definition: Tree_Schema.hpp:278
libyang::Submodule::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:178
libyang::Deviation::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1218
lys_type_info_enums
Container for information about enumeration types (LY_TYPE_ENUM), used in lys_type_info.
Definition: tree_schema.h:879
lys_ident::base_size
uint8_t base_size
Definition: tree_schema.h:2090
libyang::Schema_Node_Case::Schema_Node_Case
Schema_Node_Case(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:907
libyang::Module::Submodule
friend Submodule
Definition: Tree_Schema.hpp:114
lys_type
YANG type structure providing information from the schema.
Definition: tree_schema.h:973
libyang::Refine::target_name
const char * target_name()
Definition: Tree_Schema.hpp:1130
libyang::Schema_Node_Rpc_Action::Schema_Node_Rpc_Action
Schema_Node_Rpc_Action(S_Schema_Node derived)
Definition: Tree_Schema.hpp:990
libyang::Type_Info_Bits
Definition: Tree_Schema.hpp:236
lys_refine::target_name
const char * target_name
Definition: tree_schema.h:1876
libyang::Type_Info_Union::count
int count()
Definition: Tree_Schema.hpp:404
libyang::Ident::base_size
uint8_t base_size()
Definition: Tree_Schema.hpp:1460
lys_deviate
YANG deviate statement structure, see RFC 6020 sec. 7.18.3.2
Definition: tree_schema.h:1916
libyang::Import::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1250
LYS_LIST
@ LYS_LIST
Definition: tree_schema.h:235
libyang::Module::org
const char * org()
Definition: Tree_Schema.hpp:59
libyang::Deviate::flags
uint8_t flags()
Definition: Tree_Schema.hpp:1174
libyang::Module::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:93
libyang::Substmt::stmt
LY_STMT stmt()
Definition: Tree_Schema.hpp:1052
libyang::Refine::dflt_size
uint8_t dflt_size()
Definition: Tree_Schema.hpp:1146
lys_module::disabled
uint8_t disabled
Definition: tree_schema.h:684
libyang::Schema_Node_Augment::Schema_Node_Augment
Schema_Node_Augment(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:1029
lys_restr
YANG validity restriction (must, length, etc.) structure providing information from the schema.
Definition: tree_schema.h:2050
libyang::Schema_Node::swig_node
struct lys_node * swig_node()
Definition: Tree_Schema.hpp:582
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:709
libyang::Schema_Node_List::keys_size
uint8_t keys_size()
Definition: Tree_Schema.hpp:774
libyang::Import::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1252
LYS_CASE
@ LYS_CASE
Definition: tree_schema.h:237
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:1081
libyang::Schema_Node
Definition: Tree_Schema.hpp:527
libyang::Ident::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1454
libyang::Submodule::filepath
const char * filepath()
Definition: Tree_Schema.hpp:148
lys_module::contact
const char * contact
Definition: tree_schema.h:673
lys_ext_instance::insubstmt_index
uint8_t insubstmt_index
Definition: tree_schema.h:473
libyang::Schema_Node::dsc
const char * dsc()
Definition: Tree_Schema.hpp:535
libyang::Schema_Node::Set
friend Set
Definition: Tree_Schema.hpp:583
libyang::Refine::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:1140
libyang::Schema_Node_List::Schema_Node_List
Schema_Node_List(S_Schema_Node derived)
Definition: Tree_Schema.hpp:753
libyang::Type_Info_Ident
Definition: Tree_Schema.hpp:316
libyang::Submodule::features_size
uint8_t features_size()
Definition: Tree_Schema.hpp:170
libyang::Refine::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1136
lys_module::type
uint8_t type
Definition: tree_schema.h:675
libyang::Schema_Node::Schema_Node_List
friend Schema_Node_List
Definition: Tree_Schema.hpp:592
libyang::Module::feature_state
int feature_state(const char *feature)
Definition: Tree_Schema.cpp:94
libyang::Revision::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1296
lys_deviation
YANG deviation statement structure, see RFC 6020 sec. 7.18.3
Definition: tree_schema.h:1943
libyang::Type_Info_Union::has_ptr_type
int has_ptr_type()
Definition: Tree_Schema.hpp:406
lys_node_rpc_action
Schema rpc/action node structure.
Definition: tree_schema.h:1775
lys_ext::argument
const char * argument
Definition: tree_schema.h:452
libyang::Restr::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1402
libyang::Feature::ref
const char * ref()
Definition: Tree_Schema.hpp:1372
libyang::Import::module
S_Module module()
Definition: Tree_Schema.hpp:1244
lys_module::imp_size
uint8_t imp_size
Definition: tree_schema.h:693
libyang::Schema_Node_Rpc_Action::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:1007
libyang::Schema_Node_Notif::Schema_Node_Notif
Schema_Node_Notif(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:967
libyang::Schema_Node_Leaf::child
S_Schema_Node child() override
Definition: Tree_Schema.hpp:697
lys_refine::target_type
uint16_t target_type
Definition: tree_schema.h:1884
lys_ext_instance::ext_size
uint8_t ext_size
Definition: tree_schema.h:472
libyang::Schema_Node_Leaflist::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:728
libyang::Schema_Node_Inout::Schema_Node_Inout
Schema_Node_Inout(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:934
libyang::Schema_Node_List::max
uint32_t max()
Definition: Tree_Schema.hpp:790
LYS_CONTAINER
@ LYS_CONTAINER
Definition: tree_schema.h:231
libyang::Ext_Instance::ext_type
uint8_t ext_type()
Definition: Tree_Schema.hpp:510
libyang::Deviate::max
uint32_t max()
Definition: Tree_Schema.hpp:1190
libyang::Deviate::dflt
std::vector< std::string > dflt()
Definition: Tree_Schema.hpp:1200
libyang::Ext
Definition: Tree_Schema.hpp:1063
lys_module
Main schema node structure representing YANG module.
Definition: tree_schema.h:666
LYS_NODE
enum lys_nodetype LYS_NODE
YANG schema node types.
libyang::Submodule::extensions_size
uint8_t extensions_size()
Definition: Tree_Schema.hpp:176
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:280
lys_module::name
const char * name
Definition: tree_schema.h:668
libyang::Submodule::rev_size
uint8_t rev_size()
Definition: Tree_Schema.hpp:160
libyang::Deviate::min_set
uint8_t min_set()
Definition: Tree_Schema.hpp:1180
libyang::Ext_Instance::flags
uint16_t flags()
Definition: Tree_Schema.hpp:500
libyang::Submodule::prefix
const char * prefix()
Definition: Tree_Schema.hpp:138
libyang::Ext::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1077
libyang::Type_Info_Inst
Definition: Tree_Schema.hpp:332
libyang::Feature::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:1378
lys_type_bit
Single bit value specification for lys_type_info_bits.
Definition: tree_schema.h:820
libyang::When::cond
const char * cond()
Definition: Tree_Schema.hpp:1426
libyang::Schema_Node::Schema_Node_Inout
friend Schema_Node_Inout
Definition: Tree_Schema.hpp:597
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:878
libyang::Schema_Node_Anydata::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:819
libyang::Submodule::disabled
uint8_t disabled()
Definition: Tree_Schema.hpp:156
libyang
Definition: Libyang.hpp:30
libyang::Type_Info_Ident::count
int count()
Definition: Tree_Schema.hpp:324
lys_include
YANG include structure used to reference submodules.
Definition: tree_schema.h:1972
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.
lys_ext::name
const char * name
Definition: tree_schema.h:445
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_Info_Union
Definition: Tree_Schema.hpp:396
libyang::Module::rev_size
uint8_t rev_size()
Definition: Tree_Schema.hpp:75
lyext_substmt::cardinality
LY_STMT_CARD cardinality
Definition: tree_schema.h:438
lys_module::version
uint8_t version
Definition: tree_schema.h:676
libyang::Tpdf::module
S_Module module()
Definition: Tree_Schema.hpp:1332
libyang::Ext_Instance::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:502
libyang::Submodule::implemented
uint8_t implemented()
Definition: Tree_Schema.hpp:158
lys_type_info_bits
Container for information about bits types (LY_TYPE_BINARY), used in lys_type_info.
Definition: tree_schema.h:839
lyext_substmt
Description of the extension instance substatement.
Definition: tree_schema.h:435
libyang::Schema_Node::Data_Node
friend Data_Node
Definition: Tree_Schema.hpp:586
lys_type_info_binary
Definition: tree_schema.h:812
lys_revision::date
char date[11]
Definition: tree_schema.h:1985
libyang::Ident::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:1458
libyang::Revision
Definition: Tree_Schema.hpp:1288
libyang::Type_Info_Dec64::div
uint8_t div()
Definition: Tree_Schema.hpp:262
libyang::Deviation::target_name
const char * target_name()
Definition: Tree_Schema.hpp:1216
lys_type_info_inst::req
int8_t req
Definition: tree_schema.h:896
libyang::Submodule::deviated
uint8_t deviated()
Definition: Tree_Schema.hpp:154
lys_deviate::min_set
uint8_t min_set
Definition: tree_schema.h:1923
libyang::Ext_Instance::arg_value
const char * arg_value()
Definition: Tree_Schema.hpp:498
libyang::Restr::ref
const char * ref()
Definition: Tree_Schema.hpp:1404
libyang::Ident::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1450
libyang::Module::prefix
const char * prefix()
Definition: Tree_Schema.hpp:53
libyang::Iffeature
Definition: Tree_Schema.hpp:471
libyang::Type_Enum::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:284
libyang::Schema_Node::Schema_Node_Leaf
friend Schema_Node_Leaf
Definition: Tree_Schema.hpp:590
libyang::Type_Bit::ref
const char * ref()
Definition: Tree_Schema.hpp:216
libyang::Type_Info_Num
Definition: Tree_Schema.hpp:346
lys_deviate::max_set
uint8_t max_set
Definition: tree_schema.h:1924
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:2020
libyang::Schema_Node_Inout::Schema_Node_Inout
Schema_Node_Inout(S_Schema_Node derived)
Definition: Tree_Schema.hpp:924
libyang::Schema_Node_Anydata::Schema_Node_Anydata
Schema_Node_Anydata(S_Schema_Node derived)
Definition: Tree_Schema.hpp:802
libyang::Data_Node
classes for wrapping lyd_node.
Definition: Tree_Data.hpp:104
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:126
libyang::Module::ref
const char * ref()
Definition: Tree_Schema.hpp:57
lys_revision
YANG revision statement for (sub)modules.
Definition: tree_schema.h:1984
libyang::Type_Info_Str
Definition: Tree_Schema.hpp:378
libyang::Schema_Node::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:543
libyang::Restr::expr
const char * expr()
Definition: Tree_Schema.hpp:1400
lys_ext::ext
struct lys_ext_instance ** ext
Definition: tree_schema.h:451
libyang::Submodule::type
uint8_t type()
Definition: Tree_Schema.hpp:150
lys_ext_instance::parent_type
uint8_t parent_type
Definition: tree_schema.h:483
libyang::Module::version
uint8_t version()
Definition: Tree_Schema.hpp:67
libyang::Schema_Node::ref
const char * ref()
Definition: Tree_Schema.hpp:537
lys_refine_mod_list
Container for list modifications in lys_refine_mod.
Definition: tree_schema.h:1858
libyang::Submodule::version
uint8_t version()
Definition: Tree_Schema.hpp:152
libyang::Iffeature::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:479
libyang::Schema_Node_Augment::target
S_Schema_Node target()
Definition: Tree_Schema.hpp:1038
libyang::Type_Bit::flags
uint16_t flags()
Definition: Tree_Schema.hpp:218
libyang::Module::implemented
uint8_t implemented()
Definition: Tree_Schema.hpp:73
libyang::Type_Info_Bits::count
unsigned int count()
Definition: Tree_Schema.hpp:244
libyang::Deviate::min
uint32_t min()
Definition: Tree_Schema.hpp:1188
libyang::Schema_Node::Schema_Node_Uses
friend Schema_Node_Uses
Definition: Tree_Schema.hpp:594
libyang::Schema_Node_Grp::Schema_Node_Grp
Schema_Node_Grp(S_Schema_Node derived)
Definition: Tree_Schema.hpp:868
libyang::Schema_Node_List::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:770
libyang::Type_Enum::flags
uint16_t flags()
Definition: Tree_Schema.hpp:282
LYS_ANYDATA
@ LYS_ANYDATA
Definition: tree_schema.h:246
LYS_LEAF
@ LYS_LEAF
Definition: tree_schema.h:233
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
libyang::Module::name
const char * name()
Definition: Tree_Schema.hpp:51
libyang::Type_Enum::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:286
libyang::When::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1434
libyang::Deviate::dflt_size
uint8_t dflt_size()
Definition: Tree_Schema.hpp:1176
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:1073
libyang::Feature::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1376
lys_node_leaf
Schema leaf node structure.
Definition: tree_schema.h:1345
lys_type_info_bits::count
unsigned int count
Definition: tree_schema.h:841
libyang::Submodule::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:168
libyang::Tpdf::ref
const char * ref()
Definition: Tree_Schema.hpp:1318
lys_module::inc_size
uint8_t inc_size
Definition: tree_schema.h:694
libyang::Schema_Node_Inout::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:943
lys_module::ext_size
uint8_t ext_size
Definition: tree_schema.h:703
lys_node_uses
Schema uses node structure.
Definition: tree_schema.h:1559
libyang::When
Definition: Tree_Schema.hpp:1420
libyang::Tpdf::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1320
libyang::Type_Info_Lref::path
const char * path()
Definition: Tree_Schema.hpp:366
libyang::Type_Info_Str::pat_count
int pat_count()
Definition: Tree_Schema.hpp:388
lys_refine_mod_list::min
uint32_t min
Definition: tree_schema.h:1859
libyang::Schema_Node_Inout::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:941
libyang::Schema_Node_Leaf::Schema_Node_Leaf
Schema_Node_Leaf(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:683
libyang::Schema_Node_List::keys_str
const char * keys_str()
Definition: Tree_Schema.hpp:792
lys_module::deviation_size
uint8_t deviation_size
Definition: tree_schema.h:701
lys_deviate::units
const char * units
Definition: tree_schema.h:1934
libyang::Include::ref
const char * ref()
Definition: Tree_Schema.hpp:1280
libyang::Schema_Node_Container
Definition: Tree_Schema.hpp:609
libyang::Ident::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1456
libyang::Type
Definition: Tree_Schema.hpp:448
libyang::Schema_Node_Leaflist
Definition: Tree_Schema.hpp:707
lys_tpdf::padding_iffsize
uint8_t padding_iffsize
Definition: tree_schema.h:2001
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::Refine::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1132
libyang::Submodule::inc_size
uint8_t inc_size()
Definition: Tree_Schema.hpp:164
libyang::Type_Info_Dec64::dig
uint8_t dig()
Definition: Tree_Schema.hpp:260
libyang::Ident::name
const char * name()
Definition: Tree_Schema.hpp:1448
libyang::Import
Definition: Tree_Schema.hpp:1238
libyang::Module::feature_disable
int feature_disable(const char *feature)
Definition: Tree_Schema.cpp:91
lys_type_bit::iffeature_size
uint8_t iffeature_size
Definition: tree_schema.h:827
libyang::Schema_Node_Notif::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:974
lys_module::extensions_size
uint8_t extensions_size
Definition: tree_schema.h:702
libyang::Schema_Node_List::Schema_Node_List
Schema_Node_List(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:763
libyang::Schema_Node_Uses::augment_size
uint8_t augment_size()
Definition: Tree_Schema.hpp:850
libyang::Schema_Node_Leaf
Definition: Tree_Schema.hpp:671
lys_ext::dsc
const char * dsc
Definition: tree_schema.h:446
libyang::Submodule::ref
const char * ref()
Definition: Tree_Schema.hpp:142
libyang::Substmt::cardinality
LY_STMT_CARD cardinality()
Definition: Tree_Schema.hpp:1056
libyang::Type_Info_Enums
Definition: Tree_Schema.hpp:300
libyang::Schema_Node_Leaf::dflt
const char * dflt()
Definition: Tree_Schema.hpp:696
lys_node_augment
YANG augment structure (covering both possibilities - uses's substatement as well as (sub)module's su...
Definition: tree_schema.h:1823
lys_module::ns
const char * ns
Definition: tree_schema.h:719
lys_module::features_size
uint8_t features_size
Definition: tree_schema.h:699
libyang::Substmt
Definition: Tree_Schema.hpp:1046
libyang::Deviate::mod
LYS_DEVIATE_TYPE mod()
Definition: Tree_Schema.hpp:1172
libyang::Submodule::ctx
S_Context ctx()
Definition: Tree_Schema.hpp:134
lys_node_container
Schema container node structure.
Definition: tree_schema.h:1255
libyang::Module::data
S_Schema_Node data()
Definition: Tree_Schema.hpp:101
libyang::Schema_Node_Leaflist::max
uint32_t max()
Definition: Tree_Schema.hpp:742
lys_node_grp
Schema grouping node structure.
Definition: tree_schema.h:1606
lys_type_info_dec64::dig
uint8_t dig
Definition: tree_schema.h:850
libyang::Tpdf
Definition: Tree_Schema.hpp:1308
libyang::Include::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1274
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:588
libyang::Substmt::offset
size_t offset()
Definition: Tree_Schema.hpp:1054
lys_type_bit::flags
uint16_t flags
Definition: tree_schema.h:824
libyang::Refine_Mod
Definition: Tree_Schema.hpp:1107
lys_type_enum::value
int32_t value
Definition: tree_schema.h:870
libyang::Schema_Node_Choice
Definition: Tree_Schema.hpp:642
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:950
libyang::Restr::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1410
libyang::Refine_Mod_List::max
uint32_t max()
Definition: Tree_Schema.hpp:1099
libyang::Submodule::org
const char * org()
Definition: Tree_Schema.hpp:144
libyang::Type_Bit::iffeature_size
uint8_t iffeature_size()
Definition: Tree_Schema.hpp:222
lys_deviate::flags
uint8_t flags
Definition: tree_schema.h:1919
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:697
libyang::Schema_Node::Schema_Node_Action
friend Schema_Node_Action
Definition: Tree_Schema.hpp:599
libyang::Schema_Node::Schema_Node_Leaflist
friend Schema_Node_Leaflist
Definition: Tree_Schema.hpp:591
libyang::Type_Enum
Definition: Tree_Schema.hpp:270
libyang::Schema_Node::Schema_Node_Notif
friend Schema_Node_Notif
Definition: Tree_Schema.hpp:598
libyang::Deviate::max_set
uint8_t max_set()
Definition: Tree_Schema.hpp:1182
libyang::Schema_Node::Context
friend Context
Definition: Tree_Schema.hpp:587
libyang::Type_Info
Definition: Tree_Schema.hpp:414
LY_STMT
LY_STMT
List of YANG statements.
Definition: tree_schema.h:282
LYS_GROUPING
@ LYS_GROUPING
Definition: tree_schema.h:242
libyang::Schema_Node_Leaf::Schema_Node_Leaf
Schema_Node_Leaf(S_Schema_Node derived)
Definition: Tree_Schema.hpp:673
libyang::Restr::emsg
const char * emsg()
Definition: Tree_Schema.hpp:1408
lys_module::prefix
const char * prefix
Definition: tree_schema.h:669
lys_feature
YANG feature definition structure.
Definition: tree_schema.h:2029
LYS_USES
@ LYS_USES
Definition: tree_schema.h:243
libyang::Schema_Node_Anydata
Definition: Tree_Schema.hpp:800
lys_module::augment_size
uint8_t augment_size
Definition: tree_schema.h:700
libyang::Schema_Node::iffeature
std::vector< S_Iffeature > iffeature()
Definition: Tree_Schema.hpp:547
lys_tpdf
YANG typedef structure providing information from the schema.
Definition: tree_schema.h:1995
libyang::Type_Enum::value
int32_t value()
Definition: Tree_Schema.hpp:288
libyang::Submodule::imp_size
uint8_t imp_size()
Definition: Tree_Schema.hpp:162
libyang::Deviation::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1226
lys_type_info_ident
Container for information about identity types (LY_TYPE_IDENT), used in lys_type_info.
Definition: tree_schema.h:887
libyang::Schema_Node_Grp
Definition: Tree_Schema.hpp:866
libyang::Ext::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1071
libyang::Type_Info_Inst::req
int8_t req()
Definition: Tree_Schema.hpp:338
libyang::Schema_Node_Notif
Definition: Tree_Schema.hpp:955
libyang::Schema_Node::Schema_Node_Grp
friend Schema_Node_Grp
Definition: Tree_Schema.hpp:595
LY_DATA_TYPE
LY_DATA_TYPE
YANG built-in types.
Definition: tree_schema.h:784
lys_type_info_str::pat_count
unsigned int pat_count
Definition: tree_schema.h:936
lys_refine::must_size
uint8_t must_size
Definition: tree_schema.h:1887
lys_iffeature::expr
uint8_t * expr
Definition: tree_schema.h:1071
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:596
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
LYS_INPUT
@ LYS_INPUT
Definition: tree_schema.h:240
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
lys_module::ref
const char * ref
Definition: tree_schema.h:671
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:174
libyang::Module::inc_size
uint8_t inc_size()
Definition: Tree_Schema.hpp:79
LYS_AUGMENT
@ LYS_AUGMENT
Definition: tree_schema.h:244
libyang::Submodule::contact
const char * contact()
Definition: Tree_Schema.hpp:146
lys_module::dsc
const char * dsc
Definition: tree_schema.h:670
libyang::Deviation::deviate_size
uint8_t deviate_size()
Definition: Tree_Schema.hpp:1224
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
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:172
libyang::Schema_Node_List::unique_size
uint8_t unique_size()
Definition: Tree_Schema.hpp:776
libyang::Refine_Mod_List::min
uint32_t min()
Definition: Tree_Schema.hpp:1097
libyang::Deviation
Definition: Tree_Schema.hpp:1210
lys_ext_instance::arg_value
const char * arg_value
Definition: tree_schema.h:470
libyang::Module
classes for wrapping lys_module.
Definition: Tree_Schema.hpp:45
libyang::Refine::iffeature
std::vector< S_Iffeature > iffeature()
Definition: Tree_Schema.hpp:1150
libyang::Schema_Node::Schema_Node_Anydata
friend Schema_Node_Anydata
Definition: Tree_Schema.hpp:593
libyang::Type_Bit
Definition: Tree_Schema.hpp:206
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:454
lys_ext_instance::insubstmt
uint8_t insubstmt
Definition: tree_schema.h:480
libyang::Ext_Instance::insubstmt
uint8_t insubstmt()
Definition: Tree_Schema.hpp:506
libyang::Refine_Mod::presence
const char * presence()
Definition: Tree_Schema.hpp:1113
lys_type_info_dec64
Container for information about decimal64 types (LY_TYPE_DEC64), used in lys_type_info.
Definition: tree_schema.h:847
lyext_substmt::stmt
LY_STMT stmt
Definition: tree_schema.h:436
lys_ext
YANG extension definition.
Definition: tree_schema.h:444
libyang::Schema_Node_Anydata::Schema_Node_Anydata
Schema_Node_Anydata(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:812
lys_refine
YANG uses's refine substatement structure, see RFC 6020 sec. 7.12.2
Definition: tree_schema.h:1875
libyang::Schema_Node::Schema_Node_Rpc_Action
friend Schema_Node_Rpc_Action
Definition: Tree_Schema.hpp:601
libyang::Context
class for wrapping ly_ctx.
Definition: Libyang.hpp:44
libyang::Type_Info_Lref::req
int8_t req()
Definition: Tree_Schema.hpp:370
libyang::Type_Bit::dsc
const char * dsc()
Definition: Tree_Schema.hpp:214
libyang::Ext_Instance::def
S_Ext def()
Definition: Tree_Schema.hpp:514
lys_type_info_lref::path
const char * path
Definition: tree_schema.h:915
libyang::Ident::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1462
libyang::Tpdf::name
const char * name()
Definition: Tree_Schema.hpp:1314
lys_restr::eapptag
const char * eapptag
Definition: tree_schema.h:2056
lys_type_info_dec64::div
uint64_t div
Definition: tree_schema.h:854
libyang::Refine
Definition: Tree_Schema.hpp:1124
libyang::Unique::expr
std::vector< std::string > expr()
Definition: Tree_Schema.hpp:1350
libyang::Set
class for wrapping ly_set.
Definition: Libyang.hpp:187
libyang::Schema_Node_Container::Schema_Node_Container
Schema_Node_Container(S_Schema_Node derived)
Definition: Tree_Schema.hpp:611
libyang::Type::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:456
libyang::Include::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1276
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
lys_ext::ref
const char * ref
Definition: tree_schema.h:447
libyang::Feature::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1380
lys_module::filepath
const char * filepath
Definition: tree_schema.h:674
libyang::Module::~Module
~Module()
Definition: Tree_Schema.cpp:35
libyang::Schema_Node_Leaflist::units
const char * units()
Definition: Tree_Schema.hpp:736
libyang::Submodule::ident_size
uint8_t ident_size()
Definition: Tree_Schema.hpp:166
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_Lref
Definition: Tree_Schema.hpp:360
libyang::Schema_Node_Leaflist::child
S_Schema_Node child() override
Definition: Tree_Schema.hpp:743
lys_module::org
const char * org
Definition: tree_schema.h:672
lys_unique::trg_type
uint8_t trg_type
Definition: tree_schema.h:2023
libyang::Deviate::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1178
libyang::Tpdf::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1322
libyang::When::ref
const char * ref()
Definition: Tree_Schema.hpp:1430
libyang::Revision::date
char * date()
Definition: Tree_Schema.hpp:1294
libyang::Deviation::ref
const char * ref()
Definition: Tree_Schema.hpp:1220
libyang::Tpdf::padding_iffsize
uint8_t padding_iffsize()
Definition: Tree_Schema.hpp:1324
libyang::Unique::trg_type
uint8_t trg_type()
Definition: Tree_Schema.hpp:1354
libyang::Ext::name
const char * name()
Definition: Tree_Schema.hpp:1069
libyang::Feature::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1370
lys_ext_instance::flags
uint16_t flags
Definition: tree_schema.h:471
lys_module::deviated
uint8_t deviated
Definition: tree_schema.h:680
lys_iffeature
Compiled if-feature expression structure.
Definition: tree_schema.h:1070
libyang::Ext_Instance::parent_type
uint8_t parent_type()
Definition: Tree_Schema.hpp:508
libyang::Revision::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1298
lys_refine::dflt_size
uint8_t dflt_size
Definition: tree_schema.h:1888
lys_ext_instance::ext_type
uint8_t ext_type
Definition: tree_schema.h:484
libyang::Deviate::unique_size
uint8_t unique_size()
Definition: Tree_Schema.hpp:1186
libyang::Refine::target_type
uint16_t target_type()
Definition: Tree_Schema.hpp:1142
libyang::Type_Info_Enums::count
unsigned int count()
Definition: Tree_Schema.hpp:308
libyang::Deviate::units
const char * units()
Definition: Tree_Schema.hpp:1198
LY_STMT_CARD
LY_STMT_CARD
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:374
libyang::Module::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:83
LYS_OUTPUT
@ LYS_OUTPUT
Definition: tree_schema.h:241
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:772
lys_node_leaflist
Schema leaf-list node structure.
Definition: tree_schema.h:1396
libyang::Ext_Instance::insubstmt_index
uint8_t insubstmt_index()
Definition: Tree_Schema.hpp:504
libyang::Schema_Node::Schema_Node_Augment
friend Schema_Node_Augment
Definition: Tree_Schema.hpp:600
libyang::Schema_Node::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:541
libyang::Schema_Node_Container::presence
const char * presence()
Definition: Tree_Schema.hpp:634
libyang::Ident::ref
const char * ref()
Definition: Tree_Schema.hpp:1452
libyang::Schema_Node::name
const char * name()
Definition: Tree_Schema.hpp:533
lys_module::implemented
uint8_t implemented
Definition: tree_schema.h:685
libyang::Include::submodule
S_Submodule submodule()
Definition: Tree_Schema.hpp:1270
libyang::Import::rev
char * rev()
Definition: Tree_Schema.hpp:1248
libyang::Schema_Node_Augment
Definition: Tree_Schema.hpp:1017
libyang::Schema_Node_List::min
uint32_t min()
Definition: Tree_Schema.hpp:788
libyang::Deviate::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:1184
lyext_substmt::offset
size_t offset
Definition: tree_schema.h:437
libyang::Schema_Node::validate_value
int validate_value(const char *value)
Definition: Tree_Schema.hpp:564
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
LYS_NOTIF
@ LYS_NOTIF
Definition: tree_schema.h:238
libyang::Type_Enum::name
const char * name()
Definition: Tree_Schema.hpp:276
libyang::Schema_Node_Case::Schema_Node_Case
Schema_Node_Case(S_Schema_Node derived)
Definition: Tree_Schema.hpp:897
lys_type_info
Union for holding type-specific information in lys_type.
Definition: tree_schema.h:957
libyang::Feature
Definition: Tree_Schema.hpp:1362
libyang::Type_Bit::pos
uint32_t pos()
Definition: Tree_Schema.hpp:224
LYS_LEAFLIST
@ LYS_LEAFLIST
Definition: tree_schema.h:234
libyang::Schema_Node_Rpc_Action::Schema_Node_Rpc_Action
Schema_Node_Rpc_Action(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:1000
libyang::Schema_Node_Uses::Schema_Node_Uses
Schema_Node_Uses(struct lys_node *node, S_Deleter deleter)
Definition: Tree_Schema.hpp:843
libyang::Schema_Node::flags
uint16_t flags()
Definition: Tree_Schema.hpp:539
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::Schema_Node_Grp::tpdf_size
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:885
lys_node_notif
Schema notification node structure.
Definition: tree_schema.h:1728
lys_refine_mod_list::max
uint32_t max
Definition: tree_schema.h:1860
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:1326
libyang::Module::feature_enable
int feature_enable(const char *feature)
Definition: Tree_Schema.cpp:88
lys_when::cond
const char * cond
Definition: tree_schema.h:2067
libyang::Ext::flags
uint16_t flags()
Definition: Tree_Schema.hpp:1075
libyang::Tpdf::ext
std::vector< S_Ext_Instance > ext()
Definition: Tree_Schema.hpp:1328
libyang::Schema_Node_Augment::Schema_Node_Augment
Schema_Node_Augment(S_Schema_Node derived)
Definition: Tree_Schema.hpp:1019
libyang::Module::rev
S_Revision rev()
Definition: Tree_Schema.cpp:36
lys_type_bit::pos
uint32_t pos
Definition: tree_schema.h:830
libyang::Schema_Node_Notif::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:976
lys_module::ident_size
uint16_t ident_size
Definition: tree_schema.h:696
libyang::Module::data_instantiables
std::vector< S_Schema_Node > data_instantiables(int options)
Definition: Tree_Schema.cpp:50
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:833
lys_refine_mod::presence
const char * presence
Definition: tree_schema.h:1867
lys_deviate::mod
LYS_DEVIATE_TYPE mod
Definition: tree_schema.h:1917
libyang::Refine::ext_size
uint8_t ext_size()
Definition: Tree_Schema.hpp:1138
libyang::Module::disabled
uint8_t disabled()
Definition: Tree_Schema.hpp:71
libyang::Refine::ref
const char * ref()
Definition: Tree_Schema.hpp:1134
libyang::Schema_Node::Schema_Node_Choice
friend Schema_Node_Choice
Definition: Tree_Schema.hpp:589
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:621
LYS_RPC
@ LYS_RPC
Definition: tree_schema.h:239
libyang::Schema_Node_Notif::Schema_Node_Notif
Schema_Node_Notif(S_Schema_Node derived)
Definition: Tree_Schema.hpp:957
libyang::Submodule::dsc
const char * dsc()
Definition: Tree_Schema.hpp:140
libyang::Schema_Node_Leaf::units
const char * units()
Definition: Tree_Schema.hpp:694
libyang::Schema_Node_List
Definition: Tree_Schema.hpp:751
lys_node_inout
RPC input and output node structure.
Definition: tree_schema.h:1690
libyang::Refine::must_size
uint8_t must_size()
Definition: Tree_Schema.hpp:1144
libyang::When::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1428
libyang::Schema_Node_Choice::Schema_Node_Choice
Schema_Node_Choice(S_Schema_Node derived)
Definition: Tree_Schema.hpp:644
lys_node_list
Schema list node structure.
Definition: tree_schema.h:1452
libyang::Tpdf::dsc
const char * dsc()
Definition: Tree_Schema.hpp:1316
LYS_ANYXML
@ LYS_ANYXML
Definition: tree_schema.h:236
libyang::Schema_Node_Leaflist::dflt_size
uint8_t dflt_size()
Definition: Tree_Schema.hpp:726
libyang::Restr::eapptag
const char * eapptag()
Definition: Tree_Schema.hpp:1406
LYS_ACTION
@ LYS_ACTION
Definition: tree_schema.h:245
libyang::Iffeature::expr
uint8_t * expr()
Definition: Tree_Schema.hpp:477
libyang::Type_Bit::name
const char * name()
Definition: Tree_Schema.hpp:212
lys_restr::expr
const char * expr
Definition: tree_schema.h:2051
libyang::Feature::name
const char * name()
Definition: Tree_Schema.hpp:1368