srchilite::ColorMap Class Reference

Simple map for colors (maps a color constant string to the corresponding color of the output format). More...

#include <colormap.h>

Inheritance diagram for srchilite::ColorMap:
[legend]
Collaboration diagram for srchilite::ColorMap:
[legend]

List of all members.

Public Member Functions

void setDefault (const string &d)
 Sets the default color.
const string getColor (const string &key)
const string toString () const
 Returns a string representation of the map.

Protected Attributes

string default_color
 when no color corresponds to the requested one


Detailed Description

Simple map for colors (maps a color constant string to the corresponding color of the output format).

Member Function Documentation

void srchilite::ColorMap::setDefault ( const string &  d  )  [inline]

Sets the default color.

Parameters:
d the default color

const string srchilite::ColorMap::getColor ( const string &  key  )  [inline]

Parameters:
key the color we're looking for
Returns:
the color corresponding to the specified key, or the default color if we don't have the requested key


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

Generated on Wed May 20 21:05:22 2009 for Source-highlight Library by  doxygen 1.5.6