CppCommon 1.0.6.0
C++ Common Library
Loading...
Searching...
No Matches
console.h
Go to the documentation of this file.
1
8
9#ifndef CPPCOMMON_SYSTEM_CONSOLE_H
10#define CPPCOMMON_SYSTEM_CONSOLE_H
11
12#include <ostream>
13
14namespace CppCommon {
15
36
38
43template <class TOutputStream>
44TOutputStream& operator<<(TOutputStream& stream, Color color);
45
47
52template <class TOutputStream>
53TOutputStream& operator<<(TOutputStream& stream, std::pair<Color, Color> colors);
54
56
63{
64public:
65 Console() = delete;
66 Console(const Console&) = delete;
67 Console(Console&&) = delete;
68 ~Console() = delete;
69
70 Console& operator=(const Console&) = delete;
72
74
78 static void SetColor(Color color, Color background = Color::BLACK);
79};
80
82
83} // namespace CppCommon
84
85#include "console.inl"
86
87#endif // CPPCOMMON_SYSTEM_CONSOLE_H
Console & operator=(Console &&)=delete
static void SetColor(Color color, Color background=Color::BLACK)
Set console text color.
Definition console.cpp:19
Console & operator=(const Console &)=delete
Console(const Console &)=delete
Console(Console &&)=delete
Console management inline implementation.
C++ Common project definitions.
std::ostream & operator<<(std::ostream &os, const uint128_t &value)
Definition uint128.inl:155
Color
Supported console colors.
Definition console.h:18
@ LIGHTMAGENTA
Light magenta color.
Definition console.h:32
@ BLACK
Black color.
Definition console.h:19
@ BLUE
Blue color.
Definition console.h:20
@ LIGHTCYAN
Light cyan color.
Definition console.h:30
@ CYAN
Cyan color.
Definition console.h:22
@ GREY
Grey color.
Definition console.h:26
@ BROWN
Brown color.
Definition console.h:25
@ DARKGREY
Dark grey color.
Definition console.h:27
@ LIGHTRED
Light red color.
Definition console.h:31
@ YELLOW
Yellow color.
Definition console.h:33
@ LIGHTBLUE
Light blue color.
Definition console.h:28
@ GREEN
Green color.
Definition console.h:21
@ RED
Red color.
Definition console.h:23
@ LIGHTGREEN
Light green color.
Definition console.h:29
@ WHITE
White color.
Definition console.h:34
@ MAGENTA
Magenta color.
Definition console.h:24