ITHACA-FV
2023.1
Loading...
Searching...
No Matches
src
ITHACA_CORE
ITHACAutilities
colormod.H
Go to the documentation of this file.
1
#include <ostream>
2
5
6
#ifndef colormod_H
7
#define colormod_H
8
9
namespace
Color
10
{
11
enum
Code
12
{
13
FG_RED
= 31,
14
FG_GREEN
= 32,
15
FG_BLUE
= 34,
16
FG_DEFAULT
= 39,
17
BG_RED
= 41,
18
BG_GREEN
= 42,
19
BG_BLUE
= 44,
20
BG_DEFAULT
= 49
21
};
23
class
Modifier
24
{
25
Code
code;
26
public
:
27
Modifier
(
Code
pCode) : code(pCode) {}
28
friend
std::ostream&
29
operator<<
(std::ostream& os,
const
Modifier
& mod)
30
{
31
return
os <<
"\033["
<< mod.code <<
"m"
;
32
}
33
};
34
}
35
36
#endif
Color::Modifier
Class to change color to the output stream.
Definition
colormod.H:24
Color::Modifier::Modifier
Modifier(Code pCode)
Definition
colormod.H:27
Color::Modifier::operator<<
friend std::ostream & operator<<(std::ostream &os, const Modifier &mod)
Definition
colormod.H:29
Color
Definition
colormod.H:10
Color::Code
Code
Definition
colormod.H:12
Color::BG_BLUE
@ BG_BLUE
Definition
colormod.H:19
Color::BG_DEFAULT
@ BG_DEFAULT
Definition
colormod.H:20
Color::FG_GREEN
@ FG_GREEN
Definition
colormod.H:14
Color::BG_GREEN
@ BG_GREEN
Definition
colormod.H:18
Color::FG_DEFAULT
@ FG_DEFAULT
Definition
colormod.H:16
Color::FG_BLUE
@ FG_BLUE
Definition
colormod.H:15
Color::BG_RED
@ BG_RED
Definition
colormod.H:17
Color::FG_RED
@ FG_RED
Definition
colormod.H:13
Generated by
1.11.0