alaCarte Maps
Renderer for OpenStreetMap tiles
tile.cpp
Go to the documentation of this file.
1 
23 #include "server/tile.hpp"
24 
26 
32 Tile::Tile(const shared_ptr<TileIdentifier>& id)
33  : id(id)
34 {
35 }
36 
38 {
39 }
40 
46 bool Tile::isRendered() const
47 {
48  return (image != nullptr);
49 }
50 
57 {
58  return image;
59 }
60 
68 {
69  this->image = image;
70 }
71 
77 const shared_ptr<TileIdentifier>& Tile::getIdentifier() const
78 {
79  return id;
80 }
81 
Tile(const shared_ptr< TileIdentifier > &id)
This file is part of alaCarte.
Definition: tile.cpp:32
TESTABLE void setImage(const ImageType &image)
Sets the image of this Tile.
Definition: tile.cpp:67
TESTABLE bool isRendered() const
Returns if the Tile is already rendered.
Definition: tile.cpp:46
TESTABLE const shared_ptr< TileIdentifier > & getIdentifier() const
Returns the TileIdentifier of this Tile.
Definition: tile.cpp:77
const shared_ptr< TileIdentifier > id
TileIdentifier which identifies this Tile.
Definition: tile.hpp:46
TESTABLE const ImageType & getImage() const
Returns the rendered image.
Definition: tile.cpp:56
shared_ptr< std::vector< uint8_t > > ImageType
Definition: tile.hpp:33
~Tile()
Definition: tile.cpp:37
ImageType image
Pointer to a memory block, which contains the rendered Image.
Definition: tile.hpp:44