libqi-api  2.8.7.4
 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
22 
23  //attributes control
31 
32  //dark colors
41 
42  //light colors
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 
#define QI_API
Definition: api.hpp:33
StreamColor enabledColor(StreamColor color, bool enable=true)
Returns color if enable is true, otherwise returns no color.
Definition: iocolor.hpp:59
Bold mode.
Definition: iocolor.hpp:25
Underline mode.
Definition: iocolor.hpp:28
Blink mode.
Definition: iocolor.hpp:29
dll import/export and compiler message
StreamColor
The Stream Color enum.
Definition: iocolor.hpp:19
std::ostream & operator<<(std::ostream &os, qi::StreamColor col)
This operator (<<) applied to an output stream is known as insertion operator.
Reset the color and mode.
Definition: iocolor.hpp:24
LogColor color()
Get log color.
Standout mode.
Definition: iocolor.hpp:27
Faint mode.
Definition: iocolor.hpp:26
Overline mode.
Definition: iocolor.hpp:30