leaf.hpp
Go to the documentation of this file.
1 
10 #ifndef _LEAF_H_
11 #define _LEAF_H_
12 
13 #include "bytetree.hpp"
14 
15 namespace verifierUtils {
16 
28 class Leaf : public ByteTree
29 {
30 private:
34  std::vector<uint8_t> bytes;
35 
36 public:
43  Leaf(std::vector<uint8_t> content);
44 
57  Leaf(std::string &s);
58 
64  Leaf(mpz_class number);
65 
74  Leaf(mpz_class number, unsigned int size);
75 
79  ~Leaf();
80 
81  // Those are inherited from ByteTree:
82 
83  std::string toString();
84 
85  std::vector<uint8_t> toVector();
86 
87  mpz_class toNumber();
88 
89  std::vector<bool> toBoolArray();
90 
91  bool isNode();
92 
93  bool isLeaf();
94 
95  mpz_class toInteger();
96 
97  unsigned int size();
98 
99  void prettyPrint(std::string indent);
100 
101  bool compare(std::string s);
102 };
103 
104 } // closing namespace
105 
106 #endif