alaCarte Maps
Renderer for OpenStreetMap tiles
ColorTable Class Reference

Simple table for name to color mappings. More...

#include <colorTable.hpp>

Public Member Functions

 ColorTable ()
 This file is part of alaCarte. More...
 
void resolve (const string &name, Color *target) const
 Operator to access the color table. More...
 
const boost::unordered_map< string, Color > & getTable () const
 Returns the hole table. More...
 

Static Public Member Functions

static const ColorTableInst ()
 Returns a instance of a color table. More...
 

Private Attributes

boost::unordered_map< string, Colortable
 Value of the table. More...
 

Detailed Description

Simple table for name to color mappings.

Definition at line 32 of file colorTable.hpp.

Constructor & Destructor Documentation

ColorTable::ColorTable ( )

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 KahlertCreates the color table

Definition at line 32 of file colorTable.cpp.

Member Function Documentation

const boost::unordered_map< string, Color > & ColorTable::getTable ( ) const

Returns the hole table.

Returns
Table with color mappings

Definition at line 237 of file colorTable.cpp.

const ColorTable & ColorTable::Inst ( )
static

Returns a instance of a color table.

If no color table exists a new one will be created.

Returns
the one and only color table

Definition at line 209 of file colorTable.cpp.

void ColorTable::resolve ( const string name,
Color target 
) const

Operator to access the color table.

Parameters
nameof the color which should be resolved.

Definition at line 221 of file colorTable.cpp.

Member Data Documentation

boost::unordered_map<string, Color> ColorTable::table
private

Value of the table.

Definition at line 45 of file colorTable.hpp.


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