summaryrefslogtreecommitdiffstats
path: root/vbench/src/vbench/core/handler.h
blob: 6e5c3b379a5bef3455ce1c78a0f181966fac5148 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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 Handler is a component to whom you can pass an object.
 **/
template <typename T>
struct Handler
{
    virtual void handle(std::unique_ptr<T> obj) = 0;
    virtual ~Handler() {}
};

} // namespace vbench