/
code.h
40 lines (30 loc) · 863 Bytes
/
code.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef IV_AERO_CODE_H_
#define IV_AERO_CODE_H_
namespace iv {
namespace aero {
static const int kUndefined = -1;
class Code {
public:
Code(const std::vector<uint8_t>& vec,
int captures, int counters, uint16_t filter, bool one_char)
: bytes_(vec),
captures_(captures),
counters_(counters),
filter_(filter),
one_char_(one_char) {
}
const std::vector<uint8_t>& bytes() const { return bytes_; }
const uint8_t* data() const { return bytes_.data(); }
int counters() const { return counters_; }
int captures() const { return captures_; }
uint16_t filter() const { return filter_; }
bool IsQuickCheckOneChar() const { return one_char_; }
private:
std::vector<uint8_t> bytes_;
int captures_;
int counters_;
uint16_t filter_;
bool one_char_;
};
} } // namespace iv::aero
#endif // IV_AERO_CODE_H_