diff --git a/CMakeLists.txt b/CMakeLists.txt index 90fce70..1415c98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project("clutchlog" - VERSION 0.12 + VERSION 0.13 DESCRIPTION "A logging system which targets versatile debugging") enable_language(CXX) # C++ diff --git a/docs/annotated.html b/docs/annotated.html index 6ccc27a..02b8c9e 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -28,7 +28,7 @@
| ▼Cclutchlog | The single class which holds everything |
| Cfmt | Color and style formatter for ANSI terminal escape sequences |
| Cscope_t | Structure holding a location matching |
| ▼Cfmt | Color and style formatter for ANSI terminal escape sequences |
| Cbg_16M | Background in 256-colors mode |
| Cbg_256 | Background in 256-colors mode |
| Ccolor | Interface class for colors representation |
| Ccolor_16M | Abstract base class for 16M colors objects (24-bits ANSI) |
| Ccolor_256 | Abstract base class for 256 colors objects (8-bits ANSI) |
| Cfg_16M | Foreground in 256-colors mode |
| Cfg_256 | Foreground in 256-colors mode |
| Cscope_t | Structure holding a location matching |
_level_word. Definition at line 618 of file clutchlog.h.
+Definition at line 1002 of file clutchlog.h.
-References _word_level.
+References _word_level.
-Referenced by threshold().
+Referenced by threshold().
@@ -428,11 +428,11 @@ template<class ... FMT>Set the style (color and typo) of the given log level.
This version accept style arguments as if they were passed to clutchlog::fmt.
Definition at line 652 of file clutchlog.h.
+Definition at line 1036 of file clutchlog.h.
-References style().
+References style().
-Referenced by style().
+Referenced by style().
@@ -480,9 +480,9 @@ template<class ... FMT>Definition at line 741 of file clutchlog.h.
+Definition at line 1125 of file clutchlog.h.
-Referenced by dump(), format(), and replace().
+Referenced by dump(), format(), and replace().
@@ -491,7 +491,7 @@ template<class ... FMT> -#include <clutchlog.h>
Collaboration diagram for clutchlog::fmt:Color and style formatter for ANSI terminal escape sequences.
-The formatter supports typographic "styles" and colors. Typographic styles are available as named tag in fmt::typo.
The formatter supports the three ANSI modes, which are automatically selected depending the argument types:
For 16-colors mode, colors are named tag in:
+The following colors are available for both foregrounds (see fmt::fg) and backgrounds (see fmt::bg):
For 256-colors mode, colors are expected to be passed as integers in [-1,255] or the fg::none and bg::none tags.
fg::none tag as first argument.For 16M-colors mode, colors can be encoded as:
fg::none and bg::none tags.fg::none tag as first argument.Definition at line 314 of file clutchlog.h.
+Definition at line 366 of file clutchlog.h.
Public Member Functions | |
| fmt () | |
| Empty constructor, only useful for a no-op formatter. | |
| Empty constructor, only useful for a no-op formatter. | |
| std::string | operator() (const std::string &msg) const |
| Format the given string with the currently encoded format. More... | str () const |
| Return the formatting code as a string. | |
All combination of constructors with different parameters orders. | |
All combination of 16-colors mode constructors with different parameters orders. | |
| - | fmt (fg f, bg b=bg::none, typo s=typo::none) | fmt (fg f, bg b=bg::none, typo s=typo::none) |
| - | fmt (fg f, typo s, bg b=bg::none) | fmt (fg f, typo s, bg b=bg::none) |
| - | fmt (bg b, fg f=fg::none, typo s=typo::none) | fmt (bg b, fg f=fg::none, typo s=typo::none) |
| - | fmt (bg b, typo s, fg f=fg::none) | fmt (bg b, typo s, fg f=fg::none) |
| - | fmt (typo s, fg f=fg::none, bg b=bg::none) | fmt (typo s, fg f=fg::none, bg b=bg::none) |
| - | fmt (typo s, bg b, fg f=fg::none) | fmt (typo s, bg b, fg f=fg::none) |
All combination of 256-colors mode constructors with different parameters orders. | |
| + | fmt (fg_256 f, bg_256 b, typo s=typo::none) |
| + | fmt (fg_256 f, typo s=typo::none) |
| + | fmt (fg, bg_256 b, typo s=typo::none) |
All combination of 16M-colors mode constructors with different parameters orders. | |
| + | fmt (const short fr, const short fg, const short fb, const short gr, const short gg, const short gb, typo s=typo::none) |
| + | fmt (fg, const short gr, const short gg, const short gb, typo s=typo::none) |
| + | fmt (const short fr, const short fg, const short fb, bg, typo s=typo::none) |
| + | fmt (const short fr, const short fg, const short fb, typo s=typo::none) |
| + | fmt (const std::string &f, const std::string &b, typo s=typo::none) |
| + | fmt (fg, const std::string &b, typo s=typo::none) |
| + | fmt (const std::string &f, bg, typo s=typo::none) |
| + | fmt (const std::string &f, typo s=typo::none) |
Public Attributes | |
| -enum clutchlog::fmt::fg | fore |
| Foreground color. | |
| -enum clutchlog::fmt::bg | back |
| Background color. | |
| +enum clutchlog::fmt::ansi | mode |
| Current ANSI color mode. | |
| enum clutchlog::fmt::typo | style |
| Typographic style. | |
| +enum clutchlog::fmt::fg | fore |
| Foreground color. | |
| +enum clutchlog::fmt::bg | back |
| Background color. | |
Protected Member Functions | Print the currently encoded format escape code on the given output stream. |
+Protected Attributes | |
| +clutchlog::fmt::fg_256 | fore_256 |
| Current foreground in 256-colors mode. | |
| +clutchlog::fmt::bg_256 | back_256 |
| Current background in 256-colors mode. | |
| +clutchlog::fmt::fg_16M | fore_16M |
| Current foreground in 16M-colors mode. | |
| +clutchlog::fmt::bg_16M | back_16M |
| Current background in 16M-colors mode. | |
+Classes | |
| struct | bg_16M |
| background in 256-colors mode. More... | |
| struct | bg_256 |
| Background in 256-colors mode. More... | |
| struct | color |
| Interface class for colors representation. More... | |
| struct | color_16M |
| Abstract base class for 16M colors objects (24-bits ANSI). More... | |
| struct | color_256 |
| Abstract base class for 256 colors objects (8-bits ANSI). More... | |
| struct | fg_16M |
| Foreground in 256-colors mode. More... | |
| struct | fg_256 |
| Foreground in 256-colors mode. More... | |
Public Types | |
| enum | fg { + |
| enum | ansi { ansi::colors_16 = -1, +ansi::colors_256 = 5, +ansi::colors_16M = 2 + } |
| ANSI code configuring the available number of colors. More... | |
| enum | typo { + reset = 0, +bold = 1, +underline = 4, +inverse = 7, + + none = -1 + + } |
| Typographic style codes. | |
| enum | fg { black = 30, red = 31, green = 32, @@ -174,12 +322,22 @@ Public Types |
| Foreground color codes. | |
| enum | bg { + |
| Foreground color codes. | |
| enum | bg { black = 40, red = 41, green = 42, @@ -190,25 +348,32 @@ Public Types |
| Background color codes. | |
| enum | typo { - reset = 0, -bold = 1, -underline = 4, -inverse = 7, - - none - - } |
| Typographic style codes. | |
| Background color codes. | |
Friends | |||
| +std::ostream & | operator<< (std::ostream &os, const std::tuple< fg, bg, typo > &fbs) | ||
| Output stream operator for a 3-tuple of 16-colors mode tags. | |||
| +std::ostream & | operator<< (std::ostream &os, const typo &s) | ||
| Output stream operator for a typo tag alone, in 16-colors mode. | |||
| std::ostream & | operator<< (std::ostream &os, const fmt &fmt) | ||
| Output stream overload. More... | |||
+
|
+ +strong | +
ANSI code configuring the available number of colors.
+| Enumerator | |
|---|---|
| colors_16 | 16 colors mode. + |
| colors_256 | 256 colors mode. + |
| colors_16M | 16 millions ("true") colors mode. + |
Definition at line 369 of file clutchlog.h.
|
-
| ||
|
+clutchlog::fmt::color | +clutchlog::fmt::fg_256 | +|
| clutchlog::fmt::color_16M | +clutchlog::fmt | +||
| clutchlog::fmt::bg_16M | +clutchlog::fmt::color_256 |
|
|
| clutchlog | -clutchlog::fmt | +||
| clutchlog::fmt::bg_256 | +
|
+||
|
clutchlog::scope_t | ||
| clutchlog::fmt::fg_16M | +|||
| clutchlog | +|||
Go to the source code of this file.
@@ -127,6 +127,27 @@ Classes| File in tests | Includes file in clutchlog |
|---|---|
| t-assert.cpp | clutchlog.h |
| t-color.cpp | clutchlog.h |
| t-demo.cpp | clutchlog.h |
| t-dump.cpp | clutchlog.h |
| t-log.cpp | clutchlog.h |
| t-one-line-if.cpp | clutchlog.h |
| File in tests | Includes file in clutchlog |
|---|---|
| t-assert.cpp | clutchlog.h |
| t-color.cpp | clutchlog.h |
| t-color16M.cpp | clutchlog.h |
| t-color256.cpp | clutchlog.h |
| t-demo.cpp | clutchlog.h |
| t-dump.cpp | clutchlog.h |
| t-fmt-constructors.cpp | clutchlog.h |
| t-log.cpp | clutchlog.h |
| t-one-line-if.cpp | clutchlog.h |
|
+ clutchlog
+ 0.13
+
+ |
+
+Enumerations | |
| enum | clutchlog::fmt::fg { + black = 30, +red = 31, +green = 32, +yellow = 33, + + blue = 34, +magenta = 35, +cyan = 36, +white = 37, + + bright_black = 90, +bright_red = 91, +bright_green = 92, +bright_yellow = 93, + + bright_blue = 94, +bright_magenta = 95, +bright_cyan = 96, +bright_white = 97, + + none = -1 + + } |
| Foreground color codes. | |
| enum | clutchlog::fmt::bg { + black = 40, +red = 41, +green = 42, +yellow = 43, + + blue = 44, +magenta = 45, +cyan = 46, +white = 47, + + bright_black = 100, +bright_red = 101, +bright_green = 102, +bright_yellow = 103, + + bright_blue = 104, +bright_magenta = 105, +bright_cyan = 106, +bright_white = 107, + + none = -1 + + } |
| Background color codes. | |
+Variables | |
| +enum clutchlog::fmt::fg | clutchlog::fmt::fore |
| Foreground color. | |
| +enum clutchlog::fmt::bg | clutchlog::fmt::back |
| Background color. | |
+Friends | |
| +std::ostream & | clutchlog::fmt::operator<< (std::ostream &os, const std::tuple< fg, bg, typo > &fbs) |
| Output stream operator for a 3-tuple of 16-colors mode tags. | |
| +std::ostream & | clutchlog::fmt::operator<< (std::ostream &os, const typo &s) |
| Output stream operator for a typo tag alone, in 16-colors mode. | |
|
+ clutchlog
+ 0.13
+
+ |
+
+Classes | |
| struct | clutchlog::fmt::color |
| Interface class for colors representation. More... | |
| struct | clutchlog::fmt::color_256 |
| Abstract base class for 256 colors objects (8-bits ANSI). More... | |
| struct | clutchlog::fmt::fg_256 |
| Foreground in 256-colors mode. More... | |
| struct | clutchlog::fmt::bg_256 |
| Background in 256-colors mode. More... | |
| struct | clutchlog::fmt::color_16M |
| Abstract base class for 16M colors objects (24-bits ANSI). More... | |
| struct | clutchlog::fmt::fg_16M |
| Foreground in 256-colors mode. More... | |
| struct | clutchlog::fmt::bg_16M |
| background in 256-colors mode. More... | |
+Variables | |
| +clutchlog::fmt::fg_256 | clutchlog::fmt::fore_256 |
| Current foreground in 256-colors mode. | |
| +clutchlog::fmt::bg_256 | clutchlog::fmt::back_256 |
| Current background in 256-colors mode. | |
| +clutchlog::fmt::fg_16M | clutchlog::fmt::fore_16M |
| Current foreground in 16M-colors mode. | |
| +clutchlog::fmt::bg_16M | clutchlog::fmt::back_16M |
| Current background in 16M-colors mode. | |
|
+ clutchlog
+ 0.13
+
+ |
+
| Cclutchlog | The single class which holds everything |
| ▼Cclutchlog::fmt::color | Interface class for colors representation |
| ▼Cclutchlog::fmt::color_16M | Abstract base class for 16M colors objects (24-bits ANSI) |
| Cclutchlog::fmt::bg_16M | Background in 256-colors mode |
| Cclutchlog::fmt::fg_16M | Foreground in 256-colors mode |
| ▼Cclutchlog::fmt::color_256 | Abstract base class for 256 colors objects (8-bits ANSI) |
| Cclutchlog::fmt::bg_256 | Background in 256-colors mode |
| Cclutchlog::fmt::fg_256 | Foreground in 256-colors mode |
| Cclutchlog::fmt | Color and style formatter for ANSI terminal escape sequences |
| Cclutchlog::scope_t | Structure holding a location matching |
Clutchlog is a logging system that targets versatile debugging. It allows to (de)clutch messages for a given: log level, source code location or call stack depth.
+Clutchlog is a spatial logging system that targets versatile debugging. It allows to (de)clutch messages for a given: log level, source code location or call stack depth.
Output lines can be colored differently depending on the log level.
Or, if you want to declare some semantics beforehand:
Note: this inserts a style marker at the very beginning of the line. If you add other styles later on the line, they will take precedence.
+Colors can be specified in several different ways. The ANSI color mode will be automatically detected, depending on the types of arguments passed to styling functions:
clutchlog::fmt::fg or clutchlog::fmt::bg will encode a 16-colors mode,clutchlog::fg::none and clutchlog::bg::none can be passed in all modes.For example, all the following lines encode a bright red foreground for the critical level:
You may use styling within the format message template itself, to add even more colors:
Note: messages at the "critical", "error" and "warning" log levels are colored by default. You may want to set their style to none if you want to stay in control of inserted colors in the format template.
The horizontal filling line (the {hfill} tag) can be configured separately with clutchlog::hfill_style, for example:
Note: this will actually reset any styling after the hfill, disabling any style you would have set for the whole message using clutchlog::format for the remaining of the message.
Available typographies:
+Typographic styles are always passed with the named tag (see clutchlog::fmt::typo), whatever the color mode.
Using the clutchlog::fmt class, you can style:
clutchlog::fmt::fg,clutchlog::fmt::bg,clutchlog::fmt::typo.clutchlog::fmt::fg,clutchlog::fmt::bg.Any of the three arguments may be passed, in any order, if an argument is omitted, it defaults to no color/style.
+In 16-colors mode, any of the arguments may be passed, in any order, if an argument is omitted, it defaults to no color/style.
Available colors are:
Available typographies:
-Note: some terminals allow the user to configure the actual encoding of those colors. You may thus notice some difference with the expected rendering of the same colors encoded in the other modes. Use the other color modes if you want to fully control the actual color rendering.
+For 256-colors mode, colors are expected to be passed as integers in [-1,255] or the fg::none and bg::none tags.
In 256-colors mode, if you want to only encode the background color, you cannot just omit the foreground color, you have to bass a fg::none tag as first argument.
For 16M-colors mode, colors can be encoded as:
fg::none and bg::none tags.You may use styling within the format message template itself, to add even more colors:
Note: messages at the "critical", "error" and "warning" log levels are colored by default. You may want to set their style to none if you want to stay in control of inserted colors in the format template.
The horizontal filling line (the {hfill} tag) can be configured separately with clutchlog::hfill_style, for example:
Note: this will actually reset any styling after the hfill, disabling any style you would have set for the whole message using clutchlog::format for the remaining of the message.
In 16M-colors mode, if you want to only encode the background color, you cannot just omit the foreground color, you have to pass a fg::none tag as first argument.
The default format of the first line of comment added with the dump macro is "# [{name}] {level} in {func} (at depth {depth}) @ {file}:{line}". It can be edited with the format_comment method. If it is set to an empty string, then no comment line is added. The default can be modified at compile time with CLUTCHDUMP_DEFAULT_FORMAT.
By default, the separator between items in the container is a new line. To change this behaviour, you can change CLUTCHDUMP_DEFAULT_SEP or call the low-level dump method.
By default, and if CLUTCHDUMP_DEFAULT_FORMAT is not defined, clutchlog will not put the location-related tags in the message formats (i.e. {file} and {line}) when not in Debug builds.
The mark used with the {depth_marks} tag can be configured with the clutchlog::depth_mark method, and its default with the CLUTCHLOG_DEFAULT_DEPTH_MARK macro:
The character used with the {hfill} tag can be configured wth the clutchlog::hfill_mark method, and its default with the CLUTCHLOG_DEFAULT_HFILL_MARK macro:
Clutchlog measures the width of the standard error channel. If it is redirected, it may be measured as very large (or very small). Thus, the clutchlog::hfill_min clutchlog::hfill_max accessors allow to set a minimum and a maximum width (in number of characters).
Note: clutchlog will use the measured width, unless it goes out of [clutchlog::hfill_min,clutchlog::hfill_max], in which case it will be caped to those bounds.
By default, clutchlog removes 5 levels of the calls stack, so that your main entrypoint corresponds to a depth of zero. You can change this behaviour by defining the CLUTCHLOG_STRIP_CALLS macro, or calling clutchlog::strip_calls.
By default, clutchlog is always enabled if the NDEBUG preprocessor variable is not defined (this variable is set by CMake in build types that differs from Debug).
You can however force clutchlog to be enabled in any build type by setting the WITH_CLUTCHLOG preprocessor variable.
Note that allowing a log level does not mean that it will actually output something. If the configured log level at runtime is lower than the log level of the message, it will still not be printed.
This behavior intend to remove as many conditional statements as possible when not debugging, without having to use preprocessor guards around calls to clutchlog, thus saving run time at no readability cost.
-All configuration setters have a getters counterpart, with the same name but taking no parameter, for example:
To control more precisely the logging, one can use the low-level clutchlog::log method:
A similar dump method exists:
You can access the identifier of log levels with clutchlog::level_of:
The CLUTHFUNC macro allows to wrap any function within the current logger.
For instance, this can be useful if you want to (de)clutch calls to asserts. To do that, just declare your own macro:
Thus, any call like ASSERT(x > 3); will be declutchable with the same configuration than a call to CLUTCHLOG.
The CLUTCHCODE macro allows to wrap any code within the current logger.
For instance:
Here what you would do to setup clutchlog with the default configuration:
Here what you would do to setup clutchlog with the default configuration using 16M-colors mode:
Because access to the call stack depth and program name are system-dependent, the features relying on the depth of the call stack and the display of the program name are only available for operating systems having the following headers: execinfo.h, stdlib.h and libgen.h (so far, tested with Linux).
Clutchlog sets the CLUTCHLOG_HAVE_UNIX_SYSINFO to 1 if the headers are available, and to 0 if they are not. You can make portable code using something like:
Because access to the current terminal width is system-dependent, the {hfill} format tag feature is only available for operating systems having the following headers: sys/ioctl.h, stdio.h and unistd.h (so far, tested with Linux).
Clutchlog sets the CLUTCHLOG_HAVE_UNIX_SYSIOCTL to 1 if the headers are available, and to 0 if they are not. You can make portable code using something like:
Some colors/styles may not be supported by some exotic terminal emulators.
Clutchlog needs C++-17 with the filesystem feature. You may need to indicate -std=c++17 -lstdc++fs to some compilers.
Calling the CLUTCHLOG macro with a message using a variable named clutchlog__msg will end in an error.
What Clutchlog do not provide at the moment (but may in a near future):
To use clutchlog, just include its header in your code and either ensure that the NDEBUG preprocessor variable is not set, either define the WITH_CLUTCHLOG preprocessor variable.
If you're using CMake (or another modern build system), it will unset NDEBUG —and thus enable clutchlog— only for the "Debug" build type, which is usually what you want if you use clutchlog, anyway.
|
+ clutchlog
+ 0.13
+
+ |
+
|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::bg_16M, including all inherited members.
+| bg_16M() | clutchlog::fmt::bg_16M | inline |
| bg_16M(short r, short g, short b) | clutchlog::fmt::bg_16M | inline |
| bg_16M(const std::string &srgb) | clutchlog::fmt::bg_16M | inline |
| bg_16M(const bg &) | clutchlog::fmt::bg_16M | inline |
| blue (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_16M(ground t) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, const std::string &srgb) | clutchlog::fmt::color_16M | inline |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| red | clutchlog::fmt::color_16M | |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
background in 256-colors mode. + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::bg_16M:
Collaboration diagram for clutchlog::fmt::bg_16M:background in 256-colors mode.
+ +Definition at line 664 of file clutchlog.h.
++Public Member Functions | |
| + | bg_16M () |
| Empty constructor: no color. | |
| bg_16M (short r, short g, short b) | |
| Numeric triplet constructor. More... | |
| bg_16M (const std::string &srgb) | |
| Hex triplet string constructor. More... | |
| bg_16M (const bg &) | |
| Conversion constructor from 16-colors mode. More... | |
Public Member Functions inherited from clutchlog::fmt::color_16M | |
| color_16M (ground t) | |
| Constructor. More... | |
| color_16M (ground t, short r, short g, short b) | |
| Numeric triplet constructor. More... | |
| color_16M (ground t, const std::string &srgb) | |
| Hex triplet string constructor. More... | |
| +bool | is_set () const |
| Returns true if the underying representation encodes an existing color. | |
| +std::ostream & | print_on (std::ostream &os) const |
| Print the color RGB triplet on the given stream. | |
Public Member Functions inherited from clutchlog::fmt::color | |
| color (ansi a, ground g) | |
| Constructor. More... | |
+Additional Inherited Members | |
Public Attributes inherited from clutchlog::fmt::color_16M | |
| short | red |
| The encoded RGB indices. More... | |
| +short | green |
| +short | blue |
Public Attributes inherited from clutchlog::fmt::color | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
Public Types inherited from clutchlog::fmt::color | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+
|
+ +inline | +
Numeric triplet constructor.
+Parameters are expected to be in [0,255].
+| r | Red color component. |
| g | Green color component. |
| b | Blue color component. |
Definition at line 676 of file clutchlog.h.
+ +
+
|
+ +inline | +
Hex triplet string constructor.
+| srgb | A "web color" hexadecimal triplet of two characters, starting with a leading number sign (e.g. "#0055ff"). |
Definition at line 684 of file clutchlog.h.
+ +
+
|
+ +inline | +
Conversion constructor from 16-colors mode.
+Definition at line 689 of file clutchlog.h.
+ +|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::bg_256, including all inherited members.
+| bg_256() | clutchlog::fmt::bg_256 | inline |
| bg_256(const short b) | clutchlog::fmt::bg_256 | inline |
| bg_256(const bg &) | clutchlog::fmt::bg_256 | inline |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| ground enum name | clutchlog::fmt::color | |
| index | clutchlog::fmt::color_256 | |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
Background in 256-colors mode. + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::bg_256:
Collaboration diagram for clutchlog::fmt::bg_256:Background in 256-colors mode.
+ +Definition at line 556 of file clutchlog.h.
++Public Member Functions | |
| + | bg_256 () |
| Empty constructor: no color. | |
| bg_256 (const short b) | |
| Constructor. More... | |
| bg_256 (const bg &) | |
| Conversion constructor from 16-colors mode. More... | |
Public Member Functions inherited from clutchlog::fmt::color_256 | |
| color_256 (ground t) | |
| Constructor. More... | |
| color_256 (ground t, const short i) | |
| Constructor. More... | |
| +bool | is_set () const |
| Returns true if the underying representation encodes an existing color. | |
| +std::ostream & | print_on (std::ostream &os) const |
| Print the color index on the given stream. | |
Public Member Functions inherited from clutchlog::fmt::color | |
| color (ansi a, ground g) | |
| Constructor. More... | |
+Additional Inherited Members | |
Public Attributes inherited from clutchlog::fmt::color_256 | |
| short | index |
| The encoded color index in 4-bits ANSI. More... | |
Public Attributes inherited from clutchlog::fmt::color | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
Public Types inherited from clutchlog::fmt::color | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+
|
+ +inline | +
Constructor.
+| b | Background color index (within [-1,255], -1 being "no color"). |
Definition at line 563 of file clutchlog.h.
+ +
+
|
+ +inline | +
Conversion constructor from 16-colors mode.
+Definition at line 568 of file clutchlog.h.
+ +|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::color, including all inherited members.
+| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| ground enum name | clutchlog::fmt::color | |
| is_set() const =0 | clutchlog::fmt::color | pure virtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| operator<<(std::ostream &os, const color &c) | clutchlog::fmt::color | friend |
| print_on(std::ostream &os) const =0 | clutchlog::fmt::color | pure virtual |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
Interface class for colors representation. + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::color:Interface class for colors representation.
+ +Definition at line 470 of file clutchlog.h.
++Public Member Functions | |
| color (ansi a, ground g) | |
| Constructor. More... | |
| +virtual bool | is_set () const =0 |
| Should return true if the underying representation encodes an existing color. | |
| +virtual std::ostream & | print_on (std::ostream &os) const =0 |
| Should print the underlying representation on the given stream. | |
+Public Attributes | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
+Public Types | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+Friends | |
| +std::ostream & | operator<< (std::ostream &os, const color &c) |
| Print the actually encoded escaped color sequence on the given stream. | |
+
|
+ +inline | +
Constructor.
+| a | ANSI mode (i.e. number of colors). |
| g | Color type (i.e. foreground or background). |
Definition at line 484 of file clutchlog.h.
+ +|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::color_16M, including all inherited members.
+| blue (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_16M(ground t) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, const std::string &srgb) | clutchlog::fmt::color_16M | inline |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| red | clutchlog::fmt::color_16M | |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
Abstract base class for 16M colors objects (24-bits ANSI). + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::color_16M:
Collaboration diagram for clutchlog::fmt::color_16M:Abstract base class for 16M colors objects (24-bits ANSI).
+ +Definition at line 573 of file clutchlog.h.
++Public Member Functions | |
| color_16M (ground t) | |
| Constructor. More... | |
| color_16M (ground t, short r, short g, short b) | |
| Numeric triplet constructor. More... | |
| color_16M (ground t, const std::string &srgb) | |
| Hex triplet string constructor. More... | |
| +bool | is_set () const |
| Returns true if the underying representation encodes an existing color. | |
| +std::ostream & | print_on (std::ostream &os) const |
| Print the color RGB triplet on the given stream. | |
Public Member Functions inherited from clutchlog::fmt::color | |
| color (ansi a, ground g) | |
| Constructor. More... | |
+Public Attributes | |
| short | red |
| The encoded RGB indices. More... | |
| +short | green |
| +short | blue |
Public Attributes inherited from clutchlog::fmt::color | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
+Additional Inherited Members | |
Public Types inherited from clutchlog::fmt::color | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+
|
+ +inline | +
Constructor.
+| t | Foreground or background tag. |
Definition at line 582 of file clutchlog.h.
+ +
+
|
+ +inline | +
Numeric triplet constructor.
+| t | Foreground or background tag. |
| r | Red color component. |
| g | Green color component. |
| b | Blue color component. |
Definition at line 591 of file clutchlog.h.
+ +
+
|
+ +inline | +
Hex triplet string constructor.
+| t | Foreground or background tag. |
| srgb | A "web color" hexadecimal triplet of two characters, starting with a leading number sign (e.g. "#0055ff"). |
Definition at line 601 of file clutchlog.h.
+ +References red.
+ +| short clutchlog::fmt::color_16M::red | +
The encoded RGB indices.
+"No color" is encoded as -1.
+ +Definition at line 577 of file clutchlog.h.
+ +Referenced by color_16M(), is_set(), and print_on().
+ +|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::color_256, including all inherited members.
+| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| ground enum name | clutchlog::fmt::color | |
| index | clutchlog::fmt::color_256 | |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
Abstract base class for 256 colors objects (8-bits ANSI). + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::color_256:
Collaboration diagram for clutchlog::fmt::color_256:Abstract base class for 256 colors objects (8-bits ANSI).
+ +Definition at line 509 of file clutchlog.h.
++Public Member Functions | |
| color_256 (ground t) | |
| Constructor. More... | |
| color_256 (ground t, const short i) | |
| Constructor. More... | |
| +bool | is_set () const |
| Returns true if the underying representation encodes an existing color. | |
| +std::ostream & | print_on (std::ostream &os) const |
| Print the color index on the given stream. | |
Public Member Functions inherited from clutchlog::fmt::color | |
| color (ansi a, ground g) | |
| Constructor. More... | |
+Public Attributes | |
| short | index |
| The encoded color index in 4-bits ANSI. More... | |
Public Attributes inherited from clutchlog::fmt::color | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
+Additional Inherited Members | |
Public Types inherited from clutchlog::fmt::color | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+
|
+ +inline | +
Constructor.
+| t | Foreground or background tag. |
Definition at line 518 of file clutchlog.h.
+ +
+
|
+ +inline | +
Constructor.
+| t | Foreground or background tag. |
| i | Color index (within [-1,255], -1 being "no color"). |
Definition at line 525 of file clutchlog.h.
+ +| short clutchlog::fmt::color_256::index | +
The encoded color index in 4-bits ANSI.
+"No color" is encoded as -1.
+ +Definition at line 513 of file clutchlog.h.
+ +Referenced by is_set(), and print_on().
+ +|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::fg_16M, including all inherited members.
+| blue (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_16M(ground t) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, const std::string &srgb) | clutchlog::fmt::color_16M | inline |
| fg_16M() | clutchlog::fmt::fg_16M | inline |
| fg_16M(short r, short g, short b) | clutchlog::fmt::fg_16M | inline |
| fg_16M(const std::string &srgb) | clutchlog::fmt::fg_16M | inline |
| fg_16M(const fg &) | clutchlog::fmt::fg_16M | inline |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| red | clutchlog::fmt::color_16M | |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
Foreground in 256-colors mode. + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::fg_16M:
Collaboration diagram for clutchlog::fmt::fg_16M:Foreground in 256-colors mode.
+ +Definition at line 634 of file clutchlog.h.
++Public Member Functions | |
| + | fg_16M () |
| Empty constructor: no color. | |
| fg_16M (short r, short g, short b) | |
| Numeric triplet constructor. More... | |
| fg_16M (const std::string &srgb) | |
| Hex triplet string constructor. More... | |
| fg_16M (const fg &) | |
| Conversion constructor from 16-colors mode. More... | |
Public Member Functions inherited from clutchlog::fmt::color_16M | |
| color_16M (ground t) | |
| Constructor. More... | |
| color_16M (ground t, short r, short g, short b) | |
| Numeric triplet constructor. More... | |
| color_16M (ground t, const std::string &srgb) | |
| Hex triplet string constructor. More... | |
| +bool | is_set () const |
| Returns true if the underying representation encodes an existing color. | |
| +std::ostream & | print_on (std::ostream &os) const |
| Print the color RGB triplet on the given stream. | |
Public Member Functions inherited from clutchlog::fmt::color | |
| color (ansi a, ground g) | |
| Constructor. More... | |
+Additional Inherited Members | |
Public Attributes inherited from clutchlog::fmt::color_16M | |
| short | red |
| The encoded RGB indices. More... | |
| +short | green |
| +short | blue |
Public Attributes inherited from clutchlog::fmt::color | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
Public Types inherited from clutchlog::fmt::color | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+
|
+ +inline | +
Numeric triplet constructor.
+Parameters are expected to be in [0,255].
+| r | Red color component. |
| g | Green color component. |
| b | Blue color component. |
Definition at line 646 of file clutchlog.h.
+ +
+
|
+ +inline | +
Hex triplet string constructor.
+| srgb | A "web color" hexadecimal triplet of two characters, starting with a leading number sign (e.g. "#0055ff"). |
Definition at line 654 of file clutchlog.h.
+ +
+
|
+ +inline | +
Conversion constructor from 16-colors mode.
+Definition at line 659 of file clutchlog.h.
+ +|
+ clutchlog
+ 0.13
+
+ |
+
This is the complete list of members for clutchlog::fmt::fg_256, including all inherited members.
+| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| fg_256() | clutchlog::fmt::fg_256 | inline |
| fg_256(const short f) | clutchlog::fmt::fg_256 | inline |
| fg_256(const fg &) | clutchlog::fmt::fg_256 | inline |
| ground enum name | clutchlog::fmt::color | |
| index | clutchlog::fmt::color_256 | |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color |
|
+ clutchlog
+ 0.13
+
+ |
+
Foreground in 256-colors mode. + More...
+ +#include <clutchlog.h>
Inheritance diagram for clutchlog::fmt::fg_256:
Collaboration diagram for clutchlog::fmt::fg_256:Foreground in 256-colors mode.
+ +Definition at line 539 of file clutchlog.h.
++Public Member Functions | |
| + | fg_256 () |
| Empty constructor: no color. | |
| fg_256 (const short f) | |
| Constructor. More... | |
| fg_256 (const fg &) | |
| Conversion constructor from 16-colors mode. More... | |
Public Member Functions inherited from clutchlog::fmt::color_256 | |
| color_256 (ground t) | |
| Constructor. More... | |
| color_256 (ground t, const short i) | |
| Constructor. More... | |
| +bool | is_set () const |
| Returns true if the underying representation encodes an existing color. | |
| +std::ostream & | print_on (std::ostream &os) const |
| Print the color index on the given stream. | |
Public Member Functions inherited from clutchlog::fmt::color | |
| color (ansi a, ground g) | |
| Constructor. More... | |
+Additional Inherited Members | |
Public Attributes inherited from clutchlog::fmt::color_256 | |
| short | index |
| The encoded color index in 4-bits ANSI. More... | |
Public Attributes inherited from clutchlog::fmt::color | |
| +ansi | mode |
| +enum clutchlog::fmt::color::ground | type |
| Type of color (foreground or background). | |
Public Types inherited from clutchlog::fmt::color | |
| enum | ground { fore = 38, +back = 48 + } |
| Codes for representing foreground or background. | |
+
|
+ +inline | +
Constructor.
+| f | Foreground color index (within [-1,255], -1 being "no color"). |
Definition at line 546 of file clutchlog.h.
+ +
+
|
+ +inline | +
Conversion constructor from 16-colors mode.
+Definition at line 551 of file clutchlog.h.
+ +Structure holding a location matching.
-Definition at line 666 of file clutchlog.h.
+Definition at line 1050 of file clutchlog.h.
Public Member Functions |
clutchlog
- 0.12
+ 0.13
|
diff --git a/docs/t-color16_m_8cpp_source.html b/docs/t-color16_m_8cpp_source.html
new file mode 100644
index 0000000..2e2acdc
--- /dev/null
+++ b/docs/t-color16_m_8cpp_source.html
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
|
+ clutchlog
+ 0.13
+
+ |
+
|
+ clutchlog
+ 0.13
+
+ |
+