![]() |
Vault
4.1
|
VStringRangeColorMapper maps ranges of string values to colors. More...
#include <vcolor.h>
Public Member Functions | |
VStringRangeColorMapper (bool usesPrefixMode) | |
virtual void | readColors (const VSettingsNode &mapperNode, VStringVector *errorList) |
virtual VColorPair | getColors (const VString &stringValue) const |
virtual VColorPair | getColors (int intValue) const |
virtual VColorPair | getColors (Vs64 int64Value) const |
virtual VColorPair | getColors (VDouble doubleValue) const |
void | addColors (const VString &rangeMin, const VColorPair &rangeColors) |
Protected Member Functions | |
virtual void | _readColorElement (const VSettingsNode &colorNode) |
Friends | |
class | VColorUnit |
VStringRangeColorMapper maps ranges of string values to colors.
Note that VStringRangeColorMapper should work pretty well for some "wildcard" string uses, because the lexical string sort works if you define string ranges with boundary values that are the start of a set of strings. For example:
rangeMin[n] = "Q" rangeMin[n+1] = "R"
This will match all strings starting with "Q" to range n. To make this work as most people would expect, we fold the string values to lower case internally. Otherwise, the normal sort order would put all upper case letters before all lower case letters, which is not what would be expected.