Welcome to mirror list, hosted at ThFree Co, Russian Federation.

read_metaline_task.hpp « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e2cd7ba0bd02dfe05fac2d7ac7bc736dfdb240bb (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
28
29
30
31
32
33
34
35
36
#pragma once

#include "drape/pointers.hpp"

#include "indexer/feature_decl.hpp"

#include "geometry/spline.hpp"

#include <atomic>
#include <map>

namespace df
{
class MapDataProvider;

using MetalineCache = std::map<FeatureID, m2::SharedSpline>;

class ReadMetalineTask
{
public:
  ReadMetalineTask(MapDataProvider & model, MwmSet::MwmId const & mwmId);

  void Run();
  void Cancel();
  bool IsCancelled() const;

  MetalineCache const & GetMetalines() const { return m_metalines; }
  MwmSet::MwmId const & GetMwmId() const { return m_mwmId; }

private:
  MapDataProvider & m_model;
  MwmSet::MwmId m_mwmId;
  MetalineCache m_metalines;
  std::atomic<bool> m_isCancelled;
};
}  // namespace df