Mapper
0.9.0
API documentation
|
MapColorMap provides a mapping from one map color to another. More...
#include <map_color.h>
Public Member Functions | |
MapColorMap () | |
Constructs a new MapColorMap. More... | |
int | size () const |
Returns the size, i.e. More... | |
void | clear () |
Clears the user-defined key-value pairs. More... | |
bool | contains (const MapColor *key) const |
Returns true if there is a user-defined value for the key color. More... | |
const MapColor * | value (const MapColor *key) const |
Returns the mapped value for the key color. More... | |
const MapColor * | operator[] (const MapColor *key) const |
Returns the mapped value for the key color. More... | |
const MapColor *& | operator[] (const MapColor *key) |
Returns a reference to pointer to the mapped value for the key color. More... | |
MapColorMap provides a mapping from one map color to another.
In addition to explicitly user-defined key-value pairs of colors, it will (in const contexts) map colors with reserved priorities to themselves, assuming that there is only a single static instance of these colors.
|
inline |
Constructs a new MapColorMap.
|
inline |
Clears the user-defined key-value pairs.
Returns true if there is a user-defined value for the key color.
Returns the mapped value for the key color.
Same as value().
Returns the user-defined value for the key color if it is defined. Otherwise, if the key color's priority is from the RESERVED domain, returns key. Otherwise returns nullptr.
Returns a reference to pointer to the mapped value for the key color.
If a user-defined mapped value does not exist yet, a default- constructed mapped value is created first.
|
inline |
Returns the size, i.e.
the number of user-defined key-value pairs.
Returns the mapped value for the key color.
Returns the user-defined value for the key color if it is defined. Otherwise, if the key color's priority is from the RESERVED domain, returns key. Otherwise returns nullptr.