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

map_shape.hpp « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c8e374d8df73943d09653e58a4c0af189d668618 (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
#pragma once

#include "message.hpp"
#include "tile_info.hpp"

#include "../drape/pointers.hpp"

namespace dp
{
  class Batcher;
  class TextureSetHolder;
}

namespace df
{

class MapShape
{
public:
  virtual ~MapShape(){}
  virtual void Draw(dp::RefPointer<dp::Batcher> batcher, dp::RefPointer<dp::TextureSetHolder> textures) const = 0;
};

class MapShapeReadedMessage : public Message
{
public:
  MapShapeReadedMessage(TileKey const & key, dp::TransferPointer<MapShape> shape)
    : m_key(key), m_shape(shape)
  {
    SetType(MapShapeReaded);
  }

  ~MapShapeReadedMessage()
  {
    m_shape.Destroy();
  }

  TileKey const & GetKey() const { return m_key; }
  /// return non const reference for correct construct MasterPointer
  dp::TransferPointer<MapShape> & GetShape() { return m_shape; }

private:
  TileKey m_key;
  dp::TransferPointer<MapShape> m_shape;
};

} // namespace df