blob: 035a9a0a38fc7422dc1f0cb3360a853139153fdd (
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
28
29
30
31
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "confighandle.h"
#include <vespa/config/common/configvalue.hpp>
namespace config {
template <typename ConfigType>
ConfigHandle<ConfigType>::ConfigHandle(std::shared_ptr<ConfigSubscription> subscription)
: _subscription(std::move(subscription))
{
}
template <typename ConfigType>
ConfigHandle<ConfigType>::~ConfigHandle() = default;
template <typename ConfigType>
std::unique_ptr<ConfigType>
ConfigHandle<ConfigType>::getConfig() const
{
return _subscription->getConfig().template newInstance<ConfigType>();
}
template <typename ConfigType>
bool
ConfigHandle<ConfigType>::isChanged() const
{
return _subscription->isChanged();
}
} // namespace config
|