blob: b3e78de3401f57e55635d028ad4407d890807691 (
plain)
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
|
#pragma once
#include <tuple>
#include <string>
#include <vector>
#include "random.h"
class LineAccumulator {
public:
LineAccumulator(const std::size_t max_length);
~LineAccumulator();
void operator()(const std::string& word);
private:
const std::size_t max_length_;
utility::Random random_;
std::size_t length_;
std::vector<
std::pair<std::string, std::uint8_t>
> tokens_;
void discharge(const bool full);
};
|