blob: 4412f20cb65269171ab5fbbfd9d1d21684d045cf (
plain)
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
|
#pragma once
#include "traffic/traffic_info.hpp"
#include "indexer/mwm_set.hpp"
#include "std/map.hpp"
#include "std/shared_ptr.hpp"
namespace traffic
{
class TrafficCache
{
public:
TrafficCache() : m_trafficColoring() {}
virtual ~TrafficCache() = default;
virtual shared_ptr<traffic::TrafficInfo::Coloring> GetTrafficInfo(MwmSet::MwmId const & mwmId) const;
protected:
void Set(MwmSet::MwmId const & mwmId, TrafficInfo::Coloring && mwmIdAndColoring);
void Remove(MwmSet::MwmId const & mwmId);
void Clear();
private:
map<MwmSet::MwmId, shared_ptr<traffic::TrafficInfo::Coloring>> m_trafficColoring;
};
} // namespace traffic
|