The Sparta Modeling Framework
|
Accessor methods for obtaining color code strings. More...
#include <Colors.hpp>
Public Member Functions | |
virtual void | enabled (bool enabled) |
would we like to enable or disable colors. By invoking this function with false, all color accessor functions return the empty string | |
const char *const * | nextBasicColor (const char *const *color=nullptr) |
Find the next basic color after the color inputted. | |
const char * | color (Color c) |
The accessors that should always be used for colors. | |
Static Public Member Functions | |
static ColorScheme & | getDefaultScheme () |
Return the default instance to the global. | |
Static Public Attributes | |
static ColorScheme * | _GBL_COLOR_SCHEME |
The default color scheme singleton. | |
Protected Attributes | |
bool | enabled_ = true |
char const * | empty_ [1] ={""} |
Whether or not we are returning real colors. | |
std::vector< const char * > | all_colors_ |
A dummy empty string array to make nextBasicColor work. | |
std::vector< const char * > | basic_colors_ |
A list of colors in order. | |
Accessor methods for obtaining color code strings.
The idea behind ColorScheme is to have the ability to disable terminal colors in the model with a simple flag. There will be a single ColorScheme instance that is controlled by a sparta command line option disables color for that instance. The majority of output can use that instance unless explicit control over colorization enable/disabled is required.
Definition at line 120 of file Colors.hpp.
|
inlinevirtual |
Definition at line 144 of file Colors.hpp.
|
inline |
Definition at line 153 of file Colors.hpp.
|
inline |
The accessors that should always be used for colors.
Definition at line 212 of file Colors.hpp.
|
inlinevirtual |
would we like to enable or disable colors. By invoking this function with false, all color accessor functions return the empty string
enabled | a boolean for whether or not we should return true color codes or empty strings. |
Definition at line 182 of file Colors.hpp.
|
inlinestatic |
Return the default instance to the global.
Definition at line 147 of file Colors.hpp.
|
inline |
Find the next basic color after the color inputted.
Definition at line 191 of file Colors.hpp.
|
static |
The default color scheme singleton.
Definition at line 123 of file Colors.hpp.
|
protected |
A dummy empty string array to make nextBasicColor work.
Definition at line 219 of file Colors.hpp.
|
protected |
A list of colors in order.
Definition at line 220 of file Colors.hpp.
|
protected |
Whether or not we are returning real colors.
Definition at line 218 of file Colors.hpp.
|
protected |
Definition at line 217 of file Colors.hpp.