- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
iocolor.hpp
Go to the documentation of this file.
1 /*
2 ** Copyright (C) 2013 Aldebaran Robotics
3 ** See COPYING for the license
4 */
5
6 #ifndef _QI_IOCOLOR_HPP_
7 # define _QI_IOCOLOR_HPP_
8
9 # include <qi/api.hpp>
10 # include <ostream>
11
12 namespace qi {
13
19 enum StreamColor {
20 //no color
21 StreamColor_None = 0,
22
23 //attributes control
24 StreamColor_Reset = 1,
25 StreamColor_Bold = 2,
26 StreamColor_Faint = 3,
27 StreamColor_Standout = 4,
28 StreamColor_Underline = 5,
29 StreamColor_Blink = 6,
30 StreamColor_Overline = 7,
31
32 //dark colors
33 StreamColor_Black = 8,
34 StreamColor_DarkRed = 9,
35 StreamColor_DarkGreen = 10,
36 StreamColor_Brown = 11,
37 StreamColor_DarkBlue = 12,
38 StreamColor_Purple = 13,
39 StreamColor_Teal = 14,
40 StreamColor_LightGray = 15,
41
42 //light colors
43 StreamColor_DarkGray = 16,
44 StreamColor_Red = 17,
45 StreamColor_Green = 18,
46 StreamColor_Yellow = 19,
47 StreamColor_Blue = 20,
48 StreamColor_Fuchsia = 21,
49 StreamColor_Turquoise = 22,
50 StreamColor_White = 23
51 };
52
59 inline StreamColor enabledColor(StreamColor color, bool enable = true) {
60 return enable ? color : StreamColor_None;
61 }
62 }
63
64 namespace std {
65
71 QI_API std::ostream& operator<<(std::ostream& os, qi::StreamColor col);
72 }
73
74 #endif // _QI_IOCOLOR_HPP_
75
qi::StreamColor_Red
Red.
Definition: iocolor.hpp:44
QI_API
#define QI_API
Definition: api.hpp:33
qi::enabledColor
StreamColor enabledColor(StreamColor color, bool enable=true)
Returns color if enable is true, otherwise returns no color.
Definition: iocolor.hpp:59
qi::StreamColor_DarkGray
Dark Gray.
Definition: iocolor.hpp:43
qi::StreamColor_Blue
Blue.
Definition: iocolor.hpp:47
qi::StreamColor_Fuchsia
Fuchsia.
Definition: iocolor.hpp:48
qi::StreamColor_Bold
Bold mode.
Definition: iocolor.hpp:25
qi::StreamColor_Underline
Underline mode.
Definition: iocolor.hpp:28
qi::StreamColor_DarkRed
Dark Red.
Definition: iocolor.hpp:34
qi::StreamColor_Blink
Blink mode.
Definition: iocolor.hpp:29
api.hpp
dll import/export and compiler message
qi::StreamColor_Black
Black.
Definition: iocolor.hpp:33
qi::StreamColor_DarkBlue
Dark Blue.
Definition: iocolor.hpp:37
qi::StreamColor
StreamColor
The Stream Color enum.
Definition: iocolor.hpp:19
qi::StreamColor_Yellow
Yellow.
Definition: iocolor.hpp:46
std::operator<<
std::ostream & operator<<(std::ostream &os, qi::StreamColor col)
This operator (<<) applied to an output stream is known as insertion operator.
qi::StreamColor_LightGray
LightGray.
Definition: iocolor.hpp:40
qi::StreamColor_Green
Green.
Definition: iocolor.hpp:45
qi::StreamColor_Teal
Teal.
Definition: iocolor.hpp:39
qi::StreamColor_Purple
Purple.
Definition: iocolor.hpp:38
qi::StreamColor_White
White.
Definition: iocolor.hpp:50
qi::StreamColor_Brown
Brown.
Definition: iocolor.hpp:36
qi::StreamColor_Reset
Reset the color and mode.
Definition: iocolor.hpp:24
qi::StreamColor_Turquoise
Turquoise.
Definition: iocolor.hpp:49
qi::log::color
LogColor color()
Get log color.
qi::StreamColor_Standout
Standout mode.
Definition: iocolor.hpp:27
qi::StreamColor_DarkGreen
Dark Green.
Definition: iocolor.hpp:35
qi::StreamColor_Faint
Faint mode.
Definition: iocolor.hpp:26
qi::StreamColor_Overline
Overline mode.
Definition: iocolor.hpp:30
qi::StreamColor_None
No Color.
Definition: iocolor.hpp:21