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

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

#include "tile.hpp"

#include "base/mutex.hpp"

#include "std/map.hpp"

class TileSet
{
private:

  typedef map<Tiler::RectInfo, Tile> TTiles;

  TTiles m_tiles;

  threads::Mutex m_mutex;

public:

  /// lock TileSet for multithreaded access.
  void Lock();
  /// unlock TileSet for multithreaded access.
  void Unlock();
  /// do we have the specified tile
  bool HasTile(Tiler::RectInfo const & rectInfo);
  /// add tile to the set
  void AddTile(Tile const & tile);
  /// get sequenceID in witch tile was rendered
  int GetTileSequenceID(Tiler::RectInfo const & rectInfo);
  void SetTileSequenceID(Tiler::RectInfo const & rectInfo, int sequenceID);
  /// get tile from the set
  Tile const & GetTile(Tiler::RectInfo const & rectInfo);
  /// remove tile from the set
  void RemoveTile(Tiler::RectInfo const & rectInfo);
  /// get the size of TileSet
  size_t Size() const;
};