summaryrefslogtreecommitdiffstats
path: root/vbench/src/vbench/core/provider.h
blob: 0b17a0415cb6dbe3c800b0ff8024fdd5945feae6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <memory>

namespace vbench {

/**
 * A Provider is a component from which you can request an object.
 **/
template <typename T>
struct Provider
{
    virtual std::unique_ptr<T> provide() = 0;
    virtual ~Provider() {}
};

} // namespace vbench