alaCarte Maps
Renderer for OpenStreetMap tiles
tile.hpp
Go to the documentation of this file.
1 
21 #pragma once
22 #ifndef TILE_HPP
23 #define TILE_HPP
24 
25 #include "settings.hpp"
26 
27 class TileIdentifier;
28 class Cache;
29 
30 class Tile
31 {
32 public:
33  typedef shared_ptr< std::vector<uint8_t> > ImageType;
34 
35  Tile(const shared_ptr<TileIdentifier>& id);
36  ~Tile();
37  TESTABLE bool isRendered() const;
38  TESTABLE const ImageType& getImage() const;
39  TESTABLE void setImage(const ImageType& image);
40  TESTABLE const shared_ptr<TileIdentifier>& getIdentifier() const;
41 
42 private:
44  ImageType image;
46  const shared_ptr<TileIdentifier> id;
47 };
48 
49 
50 
51 #endif
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
Definition: tile.hpp:30
A TileIdentifier identifies a Tile.
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
#define TESTABLE
Definition: settings.hpp:85
Definition: cache.hpp:38
ImageType image
Pointer to a memory block, which contains the rendered Image.
Definition: tile.hpp:44