18 using namespace verifierUtils;
45 std::string emptyString;
58 std::vector<uint8_t> emptyVector;
65 std::cout<<
"ERROR: in ByteTree::toBoolArray(): trying to turn a"
66 <<
" non-leaf into an array of booleans.\nAborting."
77 if (s.compare(0,2,
"01") == 0)
79 else if (s.compare(0,2,
"00") == 0)
83 std::cout<<
"ERROR in ByteTree::parseString(): string "
84 "does not correspond to a bytetree! Here is the"
85 " problematic string: "<<s<<std::endl;
97 unsigned int l = v[1] * 0x1000000
101 std::vector<uint8_t> content(v.begin()+5,v.begin()+l+5);
102 res =
new Leaf(content);
103 v.assign(v.begin()+l+5,v.end());
109 std::cout<<
"ERROR in ByteTree::parseVector(): vector "
110 "does not correspond to a bytetree! Here is the"
111 " problematic vector:\nv= ";
112 for (
unsigned int i=0; i<v.size(); i++)
113 std::cout<<v[i]<<
", ";
114 std::cout<<std::endl;
123 std::vector<uint8_t> content;
124 std::ifstream file(path);
130 content.push_back(c);
132 if (content.size() == 0)
141 std::vector<uint8_t> content(s.size());
142 for (
unsigned int i=0; i<s.size(); i++)
144 return new Leaf(content);
167 std::cout<<
"ERROR: in ByteTree::addChild(): trying to access "
168 "the children of a non-Node ByteTree. Aborting."
171 std::cout<<std::endl;
178 std::cout<<
"ERROR: in ByteTree::getChild(): trying to access "
179 "the children of a non-Node ByteTree. Aborting."
182 std::cout<<std::endl;