Commit 0a48db2b authored by Hauke Goldhammer's avatar Hauke Goldhammer

Change abstract policy to an integer example policy

parent cb66aed0
......@@ -33,14 +33,14 @@ namespace bb {
using file_name = std::string;
/// @relates file-reader
/// The Policy defines how the file-reader pares a line of the given file.
class Policy {
/// @relates stream_reader
/// The Policy defines how the stream_reader pares a line of the given file.
class IntergerPolicy {
public:
using value_type = int;
/// Returns number of produced elements or an error.
expected<size_t> operator()(std::string line, downstream<value_type> out) {
expected<size_t> operator()(std::string& line, downstream<value_type> out) {
std::vector<std::string> tokens;
split(tokens, line, ' ');
for (auto& token : tokens)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment