aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/print/istreamconfigreader.h
blob: ca703a0f67f0f02d6db5a4526b7e0f23a57f1efb (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "configreader.h"
#include "configformatter.h"

namespace config {

/**
 * Read a config from istream
 */
template <typename ConfigType>
class IstreamConfigReader : public ConfigReader<ConfigType>
{
public:
    IstreamConfigReader(std::istream & is);
    std::unique_ptr<ConfigType> read();
    std::unique_ptr<ConfigType> read(const ConfigFormatter & formatter) override;
private:
    std::istream & _is;
};

} // namespace config