HIPO  4.3.0
High Performance Output data format for experimental physics
ascii::Decoration Class Reference

ANSI text decoration (bold, italic, underline, etc.). More...

#include <color.h>

Public Types

enum  Attribute {
  RESET = 0 , BOLD = 1 , DIM = 2 , ITALIC = 3 ,
  UNDERLINE = 4 , SLOWBLINK = 5 , RAPIDBLINK = 6 , REVERSED = 7 ,
  CONCEAL = 8 , CROSSED = 9 , NO_BOLD = 22 , NO_DIM = 22 ,
  NO_ITALIC = 23 , NO_UNDERLINE = 24 , NO_BLINK = 25 , NO_REVERSED = 27 ,
  NO_CONCEAL = 28 , NO_CROSSED = 29
}
 

Static Public Member Functions

static Decoration From (Attribute attr)
 Create a Decoration from an Attribute. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Decoration &val)
 Output the decoration escape sequence to an output stream. More...
 

Detailed Description

ANSI text decoration (bold, italic, underline, etc.).

Encapsulates text decorations that can be applied to terminal output.

Definition at line 105 of file color.h.

Member Enumeration Documentation

◆ Attribute

Enumerator
RESET 
BOLD 
DIM 
ITALIC 
UNDERLINE 
SLOWBLINK 
RAPIDBLINK 
REVERSED 
CONCEAL 
CROSSED 
NO_BOLD 
NO_DIM 
NO_ITALIC 
NO_UNDERLINE 
NO_BLINK 
NO_REVERSED 
NO_CONCEAL 
NO_CROSSED 

Definition at line 107 of file color.h.

Member Function Documentation

◆ From()

static Decoration ascii::Decoration::From ( Attribute  attr)
inlinestatic

Create a Decoration from an Attribute.

Parameters
attrthe decoration attribute
Returns
a Decoration object configured with the given attribute

Definition at line 132 of file color.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Decoration val 
)
friend

Output the decoration escape sequence to an output stream.

Parameters
osthe output stream
valthe decoration to output
Returns
the output stream

Definition at line 138 of file color.h.


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