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

#include "configreader.h"

namespace config {

class ConfigFormatter;

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

} // namespace config