libyang  1.0.253
YANG data modeling language library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
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 
125 class Submodule
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 
526 class Schema_Node
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 
608 class Schema_Node_Container : public Schema_Node
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 
641 class Schema_Node_Choice : public Schema_Node
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 
670 class Schema_Node_Leaf : public Schema_Node
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 
706 class Schema_Node_Leaflist : public Schema_Node
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 
750 class Schema_Node_List : public Schema_Node
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 
799 class Schema_Node_Anydata : public Schema_Node
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 
830 class Schema_Node_Uses : public Schema_Node
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 
865 class Schema_Node_Grp : public Schema_Node
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 
894 class Schema_Node_Case : public Schema_Node
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 
921 class Schema_Node_Inout : public Schema_Node
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 
954 class Schema_Node_Notif : public Schema_Node
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 
987 class Schema_Node_Rpc_Action : public Schema_Node
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 
1016 class Schema_Node_Augment : public Schema_Node
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
uint8_t augment_size
Definition: tree_schema.h:707
const char * ref()
const char * ref
Definition: tree_schema.h:454
Common structure representing single YANG data statement describing.
Definition: tree_schema.h:1231
const char * ref()
const char * emsg
Definition: tree_schema.h:2079
Schema_Node_Leaflist(S_Schema_Node derived)
uint16_t flags()
std::vector< S_Ext_Instance > ext()
LY_STMT_CARD cardinality
Definition: tree_schema.h:445
LY_STMT_CARD
Possible cardinalities of the YANG statements.
Definition: tree_schema.h:374
Schema leaf node structure.
Definition: tree_schema.h:1367
uint8_t augment_size()
Schema grouping node structure.
Definition: tree_schema.h:1628
uint8_t iffeature_size()
S_Module module()
const char * contact()
const char * ref()
uint8_t implemented
Definition: tree_schema.h:692
LYS_DEVIATE_TYPE mod()
uint8_t ext_size()
unsigned int count
Definition: tree_schema.h:848
uint16_t target_type()
std::vector< S_Ext_Instance > ext()
Schema_Node_Container(struct lys_node *node, S_Deleter deleter)
Schema_Node_Case(S_Schema_Node derived)
Submodule schema node structure that can be included into a YANG module.
Definition: tree_schema.h:736
const char * ref()
S_Module module()
uint16_t flags()
uint8_t type
Definition: tree_schema.h:682
uint8_t ident_size()
Definition: Tree_Schema.hpp:81
S_Revision rev()
Definition: Tree_Schema.cpp:36
Module(struct lys_module *module, S_Deleter deleter)
Definition: Tree_Schema.cpp:31
const char * target_name
Definition: tree_schema.h:1898
const char * arg_value
Definition: tree_schema.h:477
uint8_t tpdf_size()
Definition: Tree_Schema.hpp:83
const char * dsc()
uint8_t trg_type
Definition: tree_schema.h:2045
uint8_t deviated
Definition: tree_schema.h:687
std::vector< S_Iffeature > iffeature()
uint8_t iffeature_size
Definition: tree_schema.h:834
Schema_Node_Uses(struct lys_node *node, S_Deleter deleter)
const char * cond
Definition: tree_schema.h:2089
const char * target_name()
YANG uses&#39;s refine substatement structure, see RFC 6020 sec. 7.12.2
Definition: tree_schema.h:1897
Schema_Node_Rpc_Action(S_Schema_Node derived)
const char * ref()
YANG import structure used to reference other schemas (modules).
Definition: tree_schema.h:1981
std::vector< S_Schema_Node > data_instantiables(int options)
Definition: Tree_Schema.cpp:50
uint8_t unique_size()
uint8_t rev_size()
Definition: Tree_Schema.hpp:75
Container for list modifications in lys_refine_mod.
Definition: tree_schema.h:1880
const char * filepath()
const char * name()
Container for information about string types (LY_TYPE_STRING), used in lys_type_info.
Definition: tree_schema.h:934
uint8_t trg_type()
std::vector< std::string > expr()
std::vector< std::string > dflt()
libyang representation of data model trees.
classes for wrapping lys_submodule.
uint8_t ext_size()
uint8_t extensions_size()
const char * ref()
const char * dsc()
S_Deleter swig_deleter()
uint8_t inc_size()
Definition: Tree_Schema.hpp:79
unsigned int pat_count
Definition: tree_schema.h:943
YANG typedef structure providing information from the schema.
Definition: tree_schema.h:2017
std::vector< S_Ext_Instance > ext()
uint8_t min_set
Definition: tree_schema.h:1945
lyxp_node_type
Types of context nodes, LYXP_NODE_ROOT_CONFIG used only in when or must conditions.
Definition: tree_schema.h:2343
const char * target_name()
Schema_Node_Inout(struct lys_node *node, S_Deleter deleter)
std::vector< S_Iffeature > iffeature()
Single enumeration value specification for lys_type_info_enums.
Definition: tree_schema.h:867
Schema_Node_Rpc_Action(struct lys_node *node, S_Deleter deleter)
const char * dsc()
uint8_t must_size
Definition: tree_schema.h:1909
const char * prefix
Definition: tree_schema.h:676
const char * ns()
Definition: Tree_Schema.hpp:95
Union for holding type-specific information in lys_type.
Definition: tree_schema.h:964
int validate_value(const char *value)
Container for information about leafref types (LY_TYPE_LEAFREF), used in lys_type_info.
Definition: tree_schema.h:921
class for wrapping ly_ctx.
Definition: Libyang.hpp:43
uint16_t flags()
uint8_t version()
Definition: Tree_Schema.hpp:67
Schema_Node_Anydata(S_Schema_Node derived)
const char * dsc()
Compiled if-feature expression structure.
Definition: tree_schema.h:1077
Schema_Node_Grp(S_Schema_Node derived)
S_Schema_Node child() override
std::vector< S_Ext_Instance > ext()
Schema leaf-list node structure.
Definition: tree_schema.h:1418
Schema_Node_List(S_Schema_Node derived)
const char * contact
Definition: tree_schema.h:680
uint8_t disabled()
Definition: Tree_Schema.hpp:71
YANG augment structure (covering both possibilities - uses&#39;s substatement as well as (sub)module&#39;s su...
Definition: tree_schema.h:1845
uint8_t inc_size
Definition: tree_schema.h:701
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
Definition: tree_schema.h:196
uint8_t has_union_leafref()
uint8_t max_set
Definition: tree_schema.h:1946
LYS_DEVIATE_TYPE mod
Definition: tree_schema.h:1939
const char * dsc()
Definition: Tree_Schema.hpp:55
Container for information about enumeration types (LY_TYPE_ENUM), used in lys_type_info.
Definition: tree_schema.h:886
uint16_t ident_size
Definition: tree_schema.h:703
Container for information about integer types, used in lys_type_info.
Definition: tree_schema.h:913
uint8_t flags
Definition: tree_schema.h:1941
const char * ref()
LY_STMT stmt
Definition: tree_schema.h:443
const char * argument
Definition: tree_schema.h:459
std::vector< S_Ext_Instance > ext()
const char * eapptag()
const char * dsc
Definition: tree_schema.h:453
Union to hold target modification in lys_refine.
Definition: tree_schema.h:1888
const char * name()
Container for information about decimal64 types (LY_TYPE_DEC64), used in lys_type_info.
Definition: tree_schema.h:854
uint8_t insubstmt_index
Definition: tree_schema.h:480
const char * ref()
Definition: Tree_Schema.hpp:57
struct lys_ext_instance ** ext
Definition: tree_schema.h:458
uint8_t has_union_leafref
Definition: tree_schema.h:2024
const char * dsc()
uint8_t iffeature_size()
std::vector< S_Ext_Instance > ext()
const char * ref
Definition: tree_schema.h:678
const char * presence()
Schema_Node_Leaflist(struct lys_node *node, S_Deleter deleter)
const char * ref()
std::vector< S_Deviation > deviation()
Definition: Tree_Schema.cpp:37
Schema_Node_Choice(S_Schema_Node derived)
const char * dsc()
int feature_enable(const char *feature)
Definition: Tree_Schema.cpp:88
Schema_Node_Choice(struct lys_node *node, S_Deleter deleter)
const char * filepath
Definition: tree_schema.h:681
const char * dsc()
const char * dsc()
const char * name()
const char * ref()
Container for information about identity types (LY_TYPE_IDENT), used in lys_type_info.
Definition: tree_schema.h:894
uint8_t ext_size()
Definition: Tree_Schema.hpp:93
uint8_t padding_iffsize()
YANG when restriction, see RFC 6020 sec. 7.19.5
Definition: tree_schema.h:2088
const char * ref()
Container for information about bits types (LY_TYPE_BINARY), used in lys_type_info.
Definition: tree_schema.h:846
uint8_t * expr
Definition: tree_schema.h:1078
S_Schema_Node data()
const char * dsc()
Schema_Node_List(struct lys_node *node, S_Deleter deleter)
const char * ref()
const char * emsg()
classes for wrapping lyd_node.
Definition: Tree_Data.hpp:103
Schema list node structure.
Definition: tree_schema.h:1474
uint8_t features_size
Definition: tree_schema.h:706
const char * ns
Definition: tree_schema.h:726
LY_STMT_CARD cardinality()
const char * argument()
uint8_t iffeature_size()
uint8_t features_size()
const char * name()
const char * dsc()
const char * dsc()
const char * units()
Container for information about instance-identifier types (LY_TYPE_INST), used in lys_type_info...
Definition: tree_schema.h:902
const char * org()
Definition: Tree_Schema.hpp:59
Main schema node structure representing YANG module.
Definition: tree_schema.h:673
uint8_t dflt_size
Definition: tree_schema.h:1910
S_Schema_Node child() override
uint8_t devaiation_size()
Definition: Tree_Schema.hpp:89
uint8_t iffeature_size()
Schema_Node_Augment(struct lys_node *node, S_Deleter deleter)
const char * name()
uint16_t flags()
const char * prefix()
Definition: Tree_Schema.hpp:53
uint32_t pos
Definition: tree_schema.h:837
Schema_Node_Grp(struct lys_node *node, S_Deleter deleter)
uint8_t unique_size
Definition: tree_schema.h:1948
Class implementation for libyang C header libyang.h.
RPC input and output node structure.
Definition: tree_schema.h:1712
uint8_t version
Definition: tree_schema.h:683
LY_DATA_TYPE _PACKED base
Definition: tree_schema.h:981
LY_DATA_TYPE
YANG built-in types.
Definition: tree_schema.h:791
uint8_t type()
Definition: Tree_Schema.hpp:65
uint8_t ext_size
Definition: tree_schema.h:710
const char * name()
Schema_Node_Leaf(struct lys_node *node, S_Deleter deleter)
uint8_t augment_size()
Definition: Tree_Schema.hpp:87
std::string print_mem(LYS_OUTFORMAT format, int options)
Definition: Tree_Schema.cpp:60
uint16_t flags
Definition: tree_schema.h:831
YANG type structure providing information from the schema.
Definition: tree_schema.h:980
char date[11]
Definition: tree_schema.h:2007
const char * filepath()
Definition: Tree_Schema.hpp:63
uint8_t ext_size()
uint8_t dflt_size()
const char * ref()
const char * ref()
YANG list&#39;s unique statement structure, see RFC 6020 sec. 7.8.3
Definition: tree_schema.h:2042
struct lys_node * swig_node()
uint8_t imp_size
Definition: tree_schema.h:700
Structure to hold information about identity, see RFC 6020 sec. 7.16
Definition: tree_schema.h:2102
Schema_Node_Augment(S_Schema_Node derived)
const char * cond()
const char * org
Definition: tree_schema.h:679
Description of the extension instance substatement.
Definition: tree_schema.h:442
uint8_t rev_size
Definition: tree_schema.h:699
Schema_Node_Container(S_Schema_Node derived)
uint8_t ext_size()
const char * org()
uint8_t extensions_size()
Definition: Tree_Schema.hpp:91
uint8_t base_size()
YANG deviate statement structure, see RFC 6020 sec. 7.18.3.2
Definition: tree_schema.h:1938
uint8_t imp_size()
Definition: Tree_Schema.hpp:77
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...
const char * name()
S_Module belongsto()
const char * ref()
uint8_t base_size
Definition: tree_schema.h:2112
const char * name
Definition: tree_schema.h:452
uint8_t extensions_size
Definition: tree_schema.h:709
const char * presence
Definition: tree_schema.h:1889
Schema uses node structure.
Definition: tree_schema.h:1581
S_Submodule submodule()
const char * units
Definition: tree_schema.h:1956
uint8_t ext_size()
int feature_state(const char *feature)
Definition: Tree_Schema.cpp:94
Schema_Node_Notif(S_Schema_Node derived)
Schema notification node structure.
Definition: tree_schema.h:1750
const char * dsc()
const char * name
Definition: tree_schema.h:675
Schema_Node_Leaf(S_Schema_Node derived)
LY_STMT
List of YANG statements.
Definition: tree_schema.h:282
YANG validity restriction (must, length, etc.) structure providing information from the schema...
Definition: tree_schema.h:2072
class for wrapping ly_set.
Definition: Libyang.hpp:186
Schema_Node_Inout(S_Schema_Node derived)
const char * contact()
Definition: Tree_Schema.hpp:61
uint8_t iffeature_size()
uint8_t must_size()
uint8_t deviation_size()
uint8_t features_size()
Definition: Tree_Schema.hpp:85
int32_t value
Definition: tree_schema.h:877
const char * arg_value()
uint8_t implemented()
Definition: Tree_Schema.hpp:73
enum lys_deviate_type LYS_DEVIATE_TYPE
Possible deviation modifications, see RFC 6020 sec. 7.18.3.2
Schema rpc/action node structure.
Definition: tree_schema.h:1797
uint8_t padding_iffsize
Definition: tree_schema.h:2023
Generic extension instance structure.
Definition: tree_schema.h:471
Container for information about union types (LY_TYPE_UNION), used in lys_type_info.
Definition: tree_schema.h:954
uint8_t ext_size()
const char * prefix()
uint8_t parent_type
Definition: tree_schema.h:490
Schema_Node_Notif(struct lys_node *node, S_Deleter deleter)
YANG extension definition.
Definition: tree_schema.h:451
const char * dsc()
const char * expr()
uint8_t disabled
Definition: tree_schema.h:691
YANG revision statement for (sub)modules.
Definition: tree_schema.h:2006
YANG include structure used to reference submodules.
Definition: tree_schema.h:1994
uint8_t deviate_size
Definition: tree_schema.h:1972
YANG feature definition structure.
Definition: tree_schema.h:2051
uint16_t tpdf_size
Definition: tree_schema.h:704
const char * eapptag
Definition: tree_schema.h:2078
const char * path
Definition: tree_schema.h:922
enum lys_nodetype LYS_NODE
YANG schema node types.
int feature_disable(const char *feature)
Definition: Tree_Schema.cpp:91
Schema_Node_Uses(S_Schema_Node derived)
Single bit value specification for lys_type_info_bits.
Definition: tree_schema.h:827
uint8_t ext_size()
const char * ref()
uint16_t target_type
Definition: tree_schema.h:1906
uint8_t deviation_size
Definition: tree_schema.h:708
classes for wrapping lys_module.
Definition: Tree_Schema.hpp:44
const char * name()
Definition: Tree_Schema.hpp:51
const char * dsc
Definition: tree_schema.h:677
Schema_Node_Anydata(struct lys_node *node, S_Deleter deleter)
Schema_Node_Case(struct lys_node *node, S_Deleter deleter)
Schema container node structure.
Definition: tree_schema.h:1277
YANG deviation statement structure, see RFC 6020 sec. 7.18.3
Definition: tree_schema.h:1965
const char * expr
Definition: tree_schema.h:2073
LY_DATA_TYPE base()
uint8_t deviated()
Definition: Tree_Schema.hpp:69