Facet class to specify text color for ELcode.
More...
#include <JColorFacet.hh>
|
static std::locale::id | id |
|
Facet class to specify text color for ELcode.
Definition at line 185 of file JColorFacet.hh.
◆ JColorFacetELcode()
JLANG::JColorFacetELcode::JColorFacetELcode |
( |
std::size_t |
refs = 0 | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 204 of file JColorFacet.hh.
JColorFacet(std::size_t refs=0)
Constructor.
◆ getName()
static const char* JLANG::JColorFacetELcode::getName |
( |
| ) |
|
|
inlinestatic |
◆ c_str()
virtual const char* JLANG::JColorFacetELcode::c_str |
( |
const JColor_t |
color | ) |
const |
|
inlineoverridevirtual |
Print color.
- Parameters
-
- Returns
- text
Implements JLANG::JColorFacet.
Definition at line 215 of file JColorFacet.hh.
217 static std::string buffer;
223 case RED:
return "[color=red]";
224 case GREEN:
return "[color=green]";
225 case BLUE:
return "[color=blue]";
226 case WHITE:
return "[color=white]";
227 case CYAN:
return "[color=cyan]";
228 case PURPLE:
return "[color=purple]";
229 case YELLOW:
return "[color=yellow]";
230 case BOLD:
return "[bold]";
238 buffer +=
"[/color]";
247 return buffer.c_str();
std::vector< int > history
static bool is_color(const int color)
Check color.
static bool is_bold(const int color)
Check bold.
◆ clone()
Clone this facet.
- Returns
- pointer to newly created facet
Implements JLANG::JColorFacet.
Definition at line 259 of file JColorFacet.hh.
JColorFacetELcode(std::size_t refs=0)
Constructor.
◆ is_color()
static bool JLANG::JColorFacet::is_color |
( |
const int |
color | ) |
|
|
inlinestaticinherited |
Check color.
- Parameters
-
- Returns
- true if color; else false
Definition at line 85 of file JColorFacet.hh.
static bool is_reset(const int color)
Check reset.
◆ is_bold()
static bool JLANG::JColorFacet::is_bold |
( |
const int |
color | ) |
|
|
inlinestaticinherited |
Check bold.
- Parameters
-
- Returns
- true if bold; else false
Definition at line 97 of file JColorFacet.hh.
◆ is_reset()
static bool JLANG::JColorFacet::is_reset |
( |
const int |
color | ) |
|
|
inlinestaticinherited |
Check reset.
- Parameters
-
- Returns
- true if reset; else false
Definition at line 109 of file JColorFacet.hh.
111 return color ==
RESET;
◆ history
◆ id
std::locale::id JLANG::JColorFacet::id |
|
staticinherited |
The documentation for this struct was generated from the following file: