blob: 2d791363ae89756512c87f2484c68254d8257027 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "map_source.h"
namespace slobrok {
MapSubscription::MapSubscription(MapSource &source, MapListener &listener, Tag)
: _source(source), _listener(listener)
{
_source.registerListener(_listener);
}
MapSubscription::~MapSubscription() {
_source.unregisterListener(_listener);
}
std::unique_ptr<MapSubscription>
MapSubscription::subscribe(MapSource &source, MapListener &listener)
{
return std::make_unique<MapSubscription>(source, listener, Tag{});
}
MapSource::~MapSource() = default;
} // namespace slobrok
|