blob: d941d1582ac85bfa1d088868e52c4b4cf7e44cb7 (
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 Yahoo. 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
|