blob: ea3a7d9ffb95f9eb1101dd3ec5fcd7e08c944975 (
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 "configwriter.h"
#include "configformatter.h"
#include <vespa/vespalib/stllike/string.h>
namespace config {
/**
* Writes a config to file, optionally using a ConfigFormatter for formatting.
*/
class FileConfigWriter : public ConfigWriter {
public:
FileConfigWriter(const vespalib::string & fileName);
// Implements ConfigWriter
bool write(const ConfigInstance & config) override;
bool write(const ConfigInstance & config, const ConfigFormatter & formatter) override;
private:
const vespalib::string _fileName;
};
} // namespace config
|