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

#include "configsnapshotreader.h"
#include <vespa/vespalib/stllike/asciistream.h>

namespace config {

/**
 * Read config snapshots from an ascii stream.
 */
class AsciiConfigSnapshotReader : public ConfigSnapshotReader {
public:
    AsciiConfigSnapshotReader(const vespalib::asciistream & is);

    /**
     * Read a config snapshot.
     *
     * @return Snapshot containing the configs.
     */
    ConfigSnapshot read() override;
private:
    const vespalib::asciistream & _is;
};

} // namespace config