|
Connect++ 0.1
A fast, readable connection prover for first-order logic.
|
Simple addition of colour to strings and ostreams. More...
#include <vic_strings.hpp>
Public Member Functions | |
| ColourString (bool uc) | |
| bool | get_use_colours () const |
| void | set_use_colours (bool b) |
| void | set_map (uint8_t i, ColourName colour) |
| ColourString | operator() (const string &_s) |
| string | operator() (const string &_s, size_t num) |
| string | red () |
| string | green () |
| string | blue () |
| string | lblue () |
| string | orange () |
| string | yellow () |
| string | purple () |
| string | grey () |
| string | lgrey () |
Simple addition of colour to strings and ostreams.
The format is:
cout << col("Hello").red() ...;
Also incorporates a map allowing the format:
col.set_map(2, ColourName::PURPLE); cout << col("Hello", 2) << ...
so that assignment of colours can easily be changed
|
inline |
This sets the member string. The idea is to allow other methods to add the colour to it.
|
inline |
Make a coloured string using the map.
Does not affect the stored string.