clutchlog 0.17
clutchlog::fmt::fg_256 Struct Reference

Foreground in 256-colors mode. More...

#include <clutchlog.h>

+ Inheritance diagram for clutchlog::fmt::fg_256:
+ Collaboration diagram for clutchlog::fmt::fg_256:

Detailed Description

Foreground in 256-colors mode.

Definition at line 553 of file clutchlog.h.

Public Member Functions

 fg_256 ()
 Empty constructor: no color. More...
 
 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. More...
 
std::ostream & print_on (std::ostream &os) const
 Print the color index on the given stream. More...
 
- Public Member Functions inherited from clutchlog::fmt::color
 color (ansi a, ground g)
 Constructor. More...
 
virtual bool is_set () const =0
 Should return true if the underying representation encodes an existing color. More...
 
virtual std::ostream & print_on (std::ostream &os) const =0
 Should print the underlying representation on the given stream. 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 class  ground { fore = 38 , back = 48 }
 Codes for representing foreground or background. More...
 

Constructor & Destructor Documentation

◆ fg_256() [1/3]

clutchlog::fmt::fg_256::fg_256 ( )
inline

Empty constructor: no color.

Definition at line 555 of file clutchlog.h.

◆ fg_256() [2/3]

clutchlog::fmt::fg_256::fg_256 ( const short  f)
inline

Constructor.

Parameters
fForeground color index (within [-1,255], -1 being "no color").

Definition at line 560 of file clutchlog.h.

◆ fg_256() [3/3]

clutchlog::fmt::fg_256::fg_256 ( const fg )
inline

Conversion constructor from 16-colors mode.

Warning
Only encodes "no color", whatever is passed.

Definition at line 565 of file clutchlog.h.


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