CppBenchmark 1.0.6.0
C++ Benchmark Library
Loading...
Searching...
No Matches
console.h
Go to the documentation of this file.
1
8
9#ifndef CPPBENCHMARK_CONSOLE_H
10#define CPPBENCHMARK_CONSOLE_H
11
12#include <ostream>
13
14namespace CppBenchmark {
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
61{
62public:
63 Console() = delete;
64 Console(const Console&) = delete;
65 Console(Console&&) = delete;
66 ~Console() = delete;
67
68 Console& operator=(const Console&) = delete;
70
72
76 static void SetColor(Color color, Color background = Color::BLACK);
77};
78
79} // namespace CppBenchmark
80
81#include "console.inl"
82
83#endif // CPPBENCHMARK_CONSOLE_H
Console(const Console &)=delete
Console(Console &&)=delete
Console & operator=(Console &&)=delete
Console & operator=(const Console &)=delete
static void SetColor(Color color, Color background=Color::BLACK)
Set console text color.
Definition console.cpp:19
Console management inline implementation.
C++ Benchmark project definitions.
Definition barrier.h:15
TOutputStream & operator<<(TOutputStream &stream, Color color)
Stream manipulator: change console text color.
Definition console.inl:12
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