alaCarte Maps
Renderer for OpenStreetMap tiles
Tile Class Reference

#include <tile.hpp>

Public Types

typedef shared_ptr< std::vector< uint8_t > > ImageType
 

Public Member Functions

 Tile (const shared_ptr< TileIdentifier > &id)
 This file is part of alaCarte. More...
 
 ~Tile ()
 
TESTABLE bool isRendered () const
 Returns if the Tile is already rendered. More...
 
TESTABLE const ImageTypegetImage () const
 Returns the rendered image. More...
 
TESTABLE void setImage (const ImageType &image)
 Sets the image of this Tile. More...
 
TESTABLE const shared_ptr< TileIdentifier > & getIdentifier () const
 Returns the TileIdentifier of this Tile. More...
 

Private Attributes

ImageType image
 Pointer to a memory block, which contains the rendered Image. More...
 
const shared_ptr< TileIdentifierid
 TileIdentifier which identifies this Tile. More...
 

Detailed Description

Definition at line 30 of file tile.hpp.

Member Typedef Documentation

typedef shared_ptr< std::vector<uint8_t> > Tile::ImageType

Definition at line 33 of file tile.hpp.

Constructor & Destructor Documentation

Tile::Tile ( const shared_ptr< TileIdentifier > &  id)

This file is part of alaCarte.

alaCarte is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

alaCarte is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with alaCarte. If not, see http://www.gnu.org/licenses/.

Copyright alaCarte 2012-2013 Simon Dreher, Florian Jacob, Tobias Kahlert, Patrick Niklaus, Bernhard Scheirle, Lisa Winter Maintainer: Tobias Kahlert Constructs a new Tile with the given TileIdentifier.

Parameters
idThe TileIdentifier which identifies the Tile.

Definition at line 32 of file tile.cpp.

Tile::~Tile ( )

Definition at line 37 of file tile.cpp.

Member Function Documentation

const shared_ptr< TileIdentifier > & Tile::getIdentifier ( ) const

Returns the TileIdentifier of this Tile.

Returns
The TileIdentifier of this Tile.

Definition at line 77 of file tile.cpp.

const Tile::ImageType & Tile::getImage ( ) const

Returns the rendered image.

Returns
The rendered image or a nullptr if it is not rendered yet.

Definition at line 56 of file tile.cpp.

bool Tile::isRendered ( ) const

Returns if the Tile is already rendered.

Returns
true if the Tile is already rendered. false if not.

Definition at line 46 of file tile.cpp.

void Tile::setImage ( const ImageType image)

Sets the image of this Tile.

Parameters
imageA pointer to a memory block, which contains the rendered image.
lengthThe length of the memory block.

Definition at line 67 of file tile.cpp.

Member Data Documentation

const shared_ptr<TileIdentifier> Tile::id
private

TileIdentifier which identifies this Tile.

Definition at line 46 of file tile.hpp.

ImageType Tile::image
private

Pointer to a memory block, which contains the rendered Image.

Definition at line 44 of file tile.hpp.


The documentation for this class was generated from the following files: