aboutsummaryrefslogtreecommitdiffstats
path: root/vbench/src/vbench/core/stream.h
blob: dcbcb3080b9675149194f2ac99229202a20306f1 (plain) (blame)
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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/data/input.h>
#include <vespa/vespalib/data/output.h>
#include "taintable.h"
#include <memory>

namespace vbench {

using Input = vespalib::Input;
using Output = vespalib::Output;

/**
 * A Stream is an abstract taintable entity that can act as both input
 * and output.
 **/
struct Stream : public Input,
                public Output,
                public Taintable
{
    ~Stream() { }
    using UP = std::unique_ptr<Stream>;
    virtual bool eof() const = 0;
};

} // namespace vbench