summaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/common/sourcefactory.h
blob: de97977c924b3aab6bbbfa496faa9a01cac3a3a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <memory>
#include "source.h"
#include "configkey.h"
#include "iconfigholder.h"

namespace config {

/*
 * Source factory, creating possible config sources.
 */
class SourceFactory {
public:
    typedef std::unique_ptr<SourceFactory> UP;
    virtual Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const = 0;
    virtual ~SourceFactory() { }
};

} // namespace common