Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Macros
Pages
verifierutils
bytetree
bytetree.hpp
Go to the documentation of this file.
1
10
#ifndef _BYTE_TREE_H_
11
#define _BYTE_TREE_H_
12
13
#include <iostream>
14
#include <gmpxx.h>
15
#include <gmp.h>
16
#include <vector>
17
#include <string>
18
#include <cstdint>
19
20
21
namespace
verifierUtils {
22
39
class
ByteTree
{
40
41
public
:
45
ByteTree
();
46
50
~ByteTree
();
51
66
static
ByteTree
*
parseString
(std::string &s);
67
83
static
ByteTree
*
parseVector
(std::vector<uint8_t> &v);
84
92
static
ByteTree
*
parseFile
(std::string path);
93
106
static
ByteTree
*
string2ByteTree
(std::string s);
107
114
virtual
bool
isLeaf
();
115
122
virtual
bool
isNode
();
123
129
virtual
std::string
toString
();
130
138
virtual
std::vector<uint8_t>
toVector
();
139
146
virtual
mpz_class
toInteger
();
147
154
virtual
std::vector<bool>
toBoolArray
();
155
162
virtual
unsigned
int
size
();
163
171
virtual
void
prettyPrint
(std::string indent);
172
188
virtual
bool
compare
(std::string s);
189
197
virtual
void
addChild
(
ByteTree
* bt);
198
205
virtual
ByteTree
*
getChild
(
unsigned
int
i);
206
};
207
208
209
}
// closing namespace
210
211
#endif