blob: 37c6f5a2de3843f7767fe3afa02aa732f3a18d21 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#pragma once
#include "drape_frontend/tile_info.hpp"
#include "base/thread.hpp"
#ifdef DEBUG
#include "base/object_tracker.hpp"
#endif
#include "std/weak_ptr.hpp"
namespace df
{
class EngineContext;
class ReadMWMTask : public threads::IRoutine
{
public:
ReadMWMTask(MemoryFeatureIndex & memIndex,
MapDataProvider & model,
EngineContext & context);
virtual void Do();
void Init(weak_ptr<TileInfo> const & tileInfo);
void Reset();
private:
weak_ptr<TileInfo> m_tileInfo;
MemoryFeatureIndex & m_memIndex;
MapDataProvider & m_model;
EngineContext & m_context;
#ifdef DEBUG
dbg::ObjectTracker m_objTracker;
bool m_checker;
#endif
};
class ReadMWMTaskFactory
{
public:
ReadMWMTaskFactory(MemoryFeatureIndex & memIndex,
MapDataProvider & model,
EngineContext & context)
: m_memIndex(memIndex)
, m_model(model)
, m_context(context) {}
ReadMWMTask * GetNew() const
{
return new ReadMWMTask(m_memIndex, m_model, m_context);
}
private:
MemoryFeatureIndex & m_memIndex;
MapDataProvider & m_model;
EngineContext & m_context;
};
} // namespace df
|