alaCarte Maps
Renderer for OpenStreetMap tiles
meta_identifier.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef META_IDENTIFIER_HPP
23 #define META_IDENTIFIER_HPP
24 
25 #include "settings.hpp"
27 
32 {
33 public:
34  static shared_ptr<MetaIdentifier> Create(const shared_ptr<TileIdentifier>& origin);
35  MetaIdentifier(const TileIdentifier& origin);
36 
37  TESTABLE int getWidth() const;
38  TESTABLE int getHeight() const;
39  bool contains(const shared_ptr<TileIdentifier> tid) const;
40 
41  TESTABLE const std::vector<shared_ptr<TileIdentifier>>& getIdentifiers() const;
42  TESTABLE void getSubIdentifiers(std::vector<shared_ptr<MetaIdentifier>>& tiles) const;
43 
44 private:
46  int width;
48  int height;
50  std::vector<shared_ptr<TileIdentifier>> tids;
51 };
52 
53 #endif
TESTABLE const std::vector< shared_ptr< TileIdentifier > > & getIdentifiers() const
std::vector< shared_ptr< TileIdentifier > > tids
list of all contained tiles
TESTABLE int getHeight() const
static shared_ptr< MetaIdentifier > Create(const shared_ptr< TileIdentifier > &origin)
This file is part of alaCarte.
MetaIdentifier(const TileIdentifier &origin)
bool contains(const shared_ptr< TileIdentifier > tid) const
A TileIdentifier identifies a Tile.
TESTABLE void getSubIdentifiers(std::vector< shared_ptr< MetaIdentifier >> &tiles) const
get all tiles that are below this tile on the next zoom level.
A MetaIdentifier identifies a set of Tiles that a rendered together.
int width
with of the meta tile in tiles
TESTABLE int getWidth() const
#define TESTABLE
Definition: settings.hpp:85
int height
height of the meta tile in tiles