36 |
|
#include <menes-xml/parse.hpp> |
37 |
|
#include <menes-xml/textwriter.hpp> |
38 |
|
|
39 |
– |
enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden, |
40 |
– |
black = 30, red, green, yellow, blue, magenta, cyan, white, |
41 |
– |
_black = 40, _red, _green, _yellow, _blue, _magenta, _cyan, _white }; |
42 |
– |
|
43 |
– |
inline std::ostream& operator<<(std::ostream& sout, Color color) |
44 |
– |
{ |
45 |
– |
return sout << "\033[" << unsigned(color) << 'm'; |
46 |
– |
} |
47 |
– |
|
39 |
|
#include "Buddy.hpp" |
40 |
|
|
41 |
|
struct Database { ext::String driver, host, user, password, db; }; |
51 |
|
public: |
52 |
|
Zoe(); |
53 |
|
enum Generator { all, agent, url, version }; |
54 |
< |
static bool debug, collector, publisher; |
54 |
> |
static bool debug, collector, publisher, color; |
55 |
|
static ext::String program, config; |
56 |
|
static ext::String generator(Generator generator = all); |
57 |
|
}; |
58 |
|
|
59 |
+ |
enum Color { reset, bright, dim, underscore = 4, blink, reverse = 7, hidden, |
60 |
+ |
black = 30, red, green, yellow, blue, magenta, cyan, white, |
61 |
+ |
_black = 40, _red, _green, _yellow, _blue, _magenta, _cyan, _white }; |
62 |
+ |
|
63 |
+ |
inline std::ostream& operator<<(std::ostream& sout, Color color) |
64 |
+ |
{ |
65 |
+ |
return Zoe::color ? sout << "\033[" << unsigned(color) << 'm' : sout; |
66 |
+ |
} |
67 |
+ |
|
68 |
|
#endif // _Zoe_hpp_ |