Cppcheck
lib
color.h
Go to the documentation of this file.
1
/*
2
* Cppcheck - A tool for static C/C++ code analysis
3
* Copyright (C) 2007-2023 Cppcheck team.
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef colorH
20
#define colorH
21
22
#include "
config.h
"
23
24
#include <ostream>
25
#include <string>
26
27
enum class
Color
{
28
Reset
= 0,
29
Bold
= 1,
30
Dim
= 2,
31
FgRed
= 31,
32
FgGreen
= 32,
33
FgBlue
= 34,
34
FgMagenta
= 35,
35
FgDefault
= 39
36
};
37
CPPCHECKLIB
std::ostream&
operator<<
(std::ostream& os,
Color
c);
38
39
CPPCHECKLIB
std::string
toString
(
Color
c);
40
41
extern
CPPCHECKLIB
bool
gDisableColors
;
// for testing
42
43
#endif
operator<<
CPPCHECKLIB std::ostream & operator<<(std::ostream &os, Color c)
Definition:
color.cpp:43
toString
CPPCHECKLIB std::string toString(Color c)
Definition:
color.cpp:54
Color
Color
Definition:
color.h:27
Color::FgGreen
@ FgGreen
Color::Bold
@ Bold
Color::FgBlue
@ FgBlue
Color::FgMagenta
@ FgMagenta
Color::FgDefault
@ FgDefault
Color::Reset
@ Reset
Color::Dim
@ Dim
Color::FgRed
@ FgRed
gDisableColors
CPPCHECKLIB bool gDisableColors
Definition:
color.cpp:28
config.h
CPPCHECKLIB
#define CPPCHECKLIB
Definition:
config.h:35
Generated on Tue May 14 2024 11:53:14 for Cppcheck by
1.9.1