clutchlog  0.15
clutchlog::fmt::color Struct Referenceabstract

Interface class for colors representation. More...

#include <clutchlog.h>

+ Inheritance diagram for clutchlog::fmt::color:

Detailed Description

Interface class for colors representation.

Definition at line 480 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.
 

Constructor & Destructor Documentation

◆ color()

clutchlog::fmt::color::color ( ansi  a,
ground  g 
)
inline

Constructor.

Parameters
aANSI mode (i.e. number of colors).
gColor type (i.e. foreground or background).

Definition at line 494 of file clutchlog.h.


The documentation for this struct was generated from the following file: