mmCEsim 0.3.0
mmWave Channel Estimation Simulation
Term Class Reference

Control terminal colors and styles. More...

#include <term.h>

Collaboration diagram for Term:
[legend]

Static Public Member Functions

static void disable ()
 Disable terminal color and style. More...
 
static void enable ()
 Enable terminal color and style. More...
 
template<typename T >
static void error (const T &msg)
 Print error message. More...
 
template<typename T >
static void message (const T &msg)
 Print a message. More...
 
template<typename T >
static void warning (const T &msg)
 Print a warning message. More...
 
static void detectEnv ()
 Detect environment variable of NO_COLOR. More...
 

Static Public Attributes

static TermOpt BLACK = "30"
 
static TermOpt RED = "31"
 
static TermOpt GREEN = "32"
 
static TermOpt YELLOW = "33"
 
static TermOpt BLUE = "34"
 
static TermOpt MAGENTA = "35"
 
static TermOpt CYAN = "36"
 
static TermOpt WHITE = "37"
 
static TermOpt DEFAULT = "39"
 
static TermOpt BG_BLACK = "40"
 
static TermOpt BG_RED = "41"
 
static TermOpt BG_GREEN = "42"
 
static TermOpt BG_YELLOW = "43"
 
static TermOpt BG_BLUE = "44"
 
static TermOpt BG_MAGENTA = "45"
 
static TermOpt BG_CYAN = "46"
 
static TermOpt BG_WHITE = "47"
 
static TermOpt BG_DEFAULT = "49"
 
static TermOpt RESET = "0"
 
static TermOpt BF = "1"
 
static TermOpt DIM = "2"
 
static TermOpt IT = "3"
 
static TermOpt UL = "4"
 
static TermOpt BLINK = "5"
 
static TermOpt INV = "7"
 
static TermOpt OFF_BF = "21"
 
static TermOpt OFF_DIM = "22"
 
static TermOpt OFF_IT = "23"
 
static TermOpt OFF_UL = "24"
 
static TermOpt OFF_BLINK = "25"
 
static TermOpt OFF_INV = "27"
 
static TermOpt ERR = RED | BF
 
static TermOpt MSG = YELLOW
 
static TermOpt WAR = YELLOW | BF
 

Detailed Description

Control terminal colors and styles.

Member Function Documentation

◆ detectEnv()

void Term::detectEnv ( )
static

Detect environment variable of NO_COLOR.

If environment variable NO_COLOR is set to a non-empty variable, The color terminal is disabled. View https://no-color.org for more information.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disable()

void Term::disable ( )
static

Disable terminal color and style.

Here is the caller graph for this function:

◆ enable()

void Term::enable ( )
static

Enable terminal color and style.

The color and style is on by default.

◆ error()

template<typename T >
void Term::error ( const T &  msg)
inlinestatic

Print error message.

Template Parameters
TThe message type.
Parameters
msgThe error message.
Here is the caller graph for this function:

◆ message()

template<typename T >
void Term::message ( const T &  msg)
inlinestatic

Print a message.

Template Parameters
TThe message type.
Parameters
msgThe message.

◆ warning()

template<typename T >
void Term::warning ( const T &  msg)
inlinestatic

Print a warning message.

Template Parameters
TThe warning message type.
Parameters
msgThe warning message.
Here is the caller graph for this function:

Member Data Documentation

◆ BF

TermOpt Term::BF = "1"
inlinestatic

bold/bright

◆ BG_BLACK

TermOpt Term::BG_BLACK = "40"
inlinestatic

◆ BG_BLUE

TermOpt Term::BG_BLUE = "44"
inlinestatic

◆ BG_CYAN

TermOpt Term::BG_CYAN = "46"
inlinestatic

◆ BG_DEFAULT

TermOpt Term::BG_DEFAULT = "49"
inlinestatic

◆ BG_GREEN

TermOpt Term::BG_GREEN = "42"
inlinestatic

◆ BG_MAGENTA

TermOpt Term::BG_MAGENTA = "45"
inlinestatic

◆ BG_RED

TermOpt Term::BG_RED = "41"
inlinestatic

◆ BG_WHITE

TermOpt Term::BG_WHITE = "47"
inlinestatic

◆ BG_YELLOW

TermOpt Term::BG_YELLOW = "43"
inlinestatic

◆ BLACK

TermOpt Term::BLACK = "30"
inlinestatic

◆ BLINK

TermOpt Term::BLINK = "5"
inlinestatic

slow blink (150 times/min)

◆ BLUE

TermOpt Term::BLUE = "34"
inlinestatic

◆ CYAN

TermOpt Term::CYAN = "36"
inlinestatic

◆ DEFAULT

TermOpt Term::DEFAULT = "39"
inlinestatic

◆ DIM

TermOpt Term::DIM = "2"
inlinestatic

dim (faint)

◆ ERR

TermOpt Term::ERR = RED | BF
inlinestatic

error message

◆ GREEN

TermOpt Term::GREEN = "32"
inlinestatic

◆ INV

TermOpt Term::INV = "7"
inlinestatic

inverse FG and BG

◆ IT

TermOpt Term::IT = "3"
inlinestatic

italic

◆ MAGENTA

TermOpt Term::MAGENTA = "35"
inlinestatic

◆ MSG

TermOpt Term::MSG = YELLOW
inlinestatic

message

◆ OFF_BF

TermOpt Term::OFF_BF = "21"
inlinestatic

off bold/bright

◆ OFF_BLINK

TermOpt Term::OFF_BLINK = "25"
inlinestatic

off slow blink (150 times/min)

◆ OFF_DIM

TermOpt Term::OFF_DIM = "22"
inlinestatic

dim (faint)

◆ OFF_INV

TermOpt Term::OFF_INV = "27"
inlinestatic

off inverse FG and BG

◆ OFF_IT

TermOpt Term::OFF_IT = "23"
inlinestatic

italic

◆ OFF_UL

TermOpt Term::OFF_UL = "24"
inlinestatic

off underline

◆ RED

TermOpt Term::RED = "31"
inlinestatic

◆ RESET

TermOpt Term::RESET = "0"
inlinestatic

◆ UL

TermOpt Term::UL = "4"
inlinestatic

underline

◆ WAR

TermOpt Term::WAR = YELLOW | BF
inlinestatic

warning message

◆ WHITE

TermOpt Term::WHITE = "37"
inlinestatic

◆ YELLOW

TermOpt Term::YELLOW = "33"
inlinestatic

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