MySQL  8.0.17
Source Code Documentation
Vt100 Namespace Reference

Typedefs

using value_type = uint16_t
 
using Rgb = std::array< uint8_t, 3 >
 

Enumerations

enum  Color {
  Color::Black = 0, Color::Red, Color::Green, Color::Yellow,
  Color::Blue, Color::Magenta, Color::Cyan, Color::White,
  Color::BrightBlack = 60 + Black, Color::BrightRed = 60 + Red, Color::BrightGreen = 60 + Green, Color::BrightYellow = 60 + Yellow,
  Color::BrightBlue = 60 + Blue, Color::BrightMagenta = 60 + Magenta, Color::BrightCyan = 60 + Cyan, Color::BrightWhite = 60 + White
}
 colors as used in Render. More...
 
enum  Render {
  Render::Default = 0, Render::Bold = 1, Render::Faint = 2, Render::Italic = 3,
  Render::Underline = 4, Render::SlowBlink = 5, Render::RapidBlink = 6, Render::Inverse = 7,
  Render::Conceal = 8, Render::CrossedOut = 9, Render::FontDefault = 10, Render::Font1 = 11,
  Render::Font2 = 12, Render::Font3 = 13, Render::Font4 = 14, Render::Font5 = 15,
  Render::Font6 = 16, Render::Font7 = 17, Render::Font8 = 18, Render::Font9 = 19,
  Render::Fraktur = 20, Render::DoublyUnderline = 21, Render::Normal = 22, Render::NoItalic = 20 + Italic,
  Render::NoUnderline = 20 + Underline, Render::NoBlink = 20 + SlowBlink, Render::NoInverse = 20 + Inverse, Render::NoConceal = 20 + Conceal,
  Render::NoCrossedOut = 20 + CrossedOut, Render::ForegroundBlack = kRenderForegroundOffset + static_cast<int>(Color::Black), Render::ForegroundRed = kRenderForegroundOffset + static_cast<int>(Color::Red), Render::ForegroundGreen = kRenderForegroundOffset + static_cast<int>(Color::Green),
  Render::ForegroundYellow = kRenderForegroundOffset + static_cast<int>(Color::Yellow), Render::ForegroundBlue = kRenderForegroundOffset + static_cast<int>(Color::Blue), Render::ForegroundMagenta, Render::ForegroundCyan = kRenderForegroundOffset + static_cast<int>(Color::Cyan),
  Render::ForegroundWhite = kRenderForegroundOffset + static_cast<int>(Color::White), Render::ForegroundExtended = kRenderForegroundOffset + 8, Render::ForegroundDefault = kRenderForegroundOffset + 9, Render::BackgroundBlack = kRenderBackgroundOffset + static_cast<int>(Color::Black),
  Render::BackgroundRed = kRenderBackgroundOffset + static_cast<int>(Color::Red), Render::BackgroundGreen = kRenderBackgroundOffset + static_cast<int>(Color::Green), Render::BackgroundYellow = kRenderBackgroundOffset + static_cast<int>(Color::Yellow), Render::BackgroundBlue = kRenderBackgroundOffset + static_cast<int>(Color::Blue),
  Render::BackgroundMagenta, Render::BackgroundCyan = kRenderBackgroundOffset + static_cast<int>(Color::Cyan), Render::BackgroundWhite = kRenderBackgroundOffset + static_cast<int>(Color::White), Render::BackgroundExtended = kRenderBackgroundOffset + 8,
  Render::BackgroundDefault = kRenderBackgroundOffset + 9, Render::Framed = 51, Render::Encircled = 52, Render::Overlined = 53,
  Render::NotFramed = 54, Render::NotOverlined = 55, Render::IdeogramUnderline = 60, Render::IdeogramDoubleUnderline = 61,
  Render::IdeogramOverline = 62, Render::IdeogramDoubleOverline = 63, Render::IdeogramStressMarking = 64, Render::NoIdeogram = 65,
  Render::ForegroundBrightBlack, Render::ForegroundBrightRed, Render::ForegroundBrightGreen, Render::ForegroundBrightYellow,
  Render::ForegroundBrightBlue, Render::ForegroundBrightMagenta, Render::ForegroundBrightCyan, Render::ForegroundBrightWhite,
  Render::BackgroundBrightBlack, Render::BackgroundBrightRed, Render::BackgroundBrightGreen, Render::BackgroundBrightYellow,
  Render::BackgroundBrightBlue, Render::BackgroundBrightMagenta, Render::BackgroundBrightCyan, Render::BackgroundBrightWhite
}
 types of "Character Attributes". More...
 
enum  Csi {
  Csi::ICH = '@', Csi::CUU = 'A', Csi::CUD = 'B', Csi::CUF = 'C',
  Csi::CUB = 'D', Csi::CNL = 'E', Csi::CPL = 'F', Csi::CHA = 'G',
  Csi::CUP = 'H', Csi::CHT = 'I', Csi::ED = 'J', Csi::EL = 'K',
  Csi::IL = 'L', Csi::DL = 'M', Csi::DCH = 'P', Csi::SU = 'S',
  Csi::SD = 'T', Csi::ECH = 'X', Csi::CBT = 'Z', Csi::DA = 'c',
  Csi::VPA = 'd', Csi::HVP = 'f', Csi::TBC = 'g', Csi::SM = 'h',
  Csi::MC = 'i', Csi::RM = 'l', Csi::SGR = 'm', Csi::DSR = 'n',
  Csi::STR = 'p', Csi::DECSTBM = 'r', Csi::SC = 's', Csi::DECRARA = 't',
  Csi::SR = 'u', Csi::DECCRA = 'v', Csi::DECEFR = 'w', Csi::DECREQTPARM = 'x',
  Csi::DECERA = 'z', Csi::DECSLE = '{', Csi::DECRQLP = '|'
}
 
enum  Erase { Erase::LeftAndCur = 0, Erase::RightAndCur, Erase::All }
 

Functions

std::string HARNESS_EXPORT render (Render r)
 get 'text rendering attributes' ESC sequence. More...
 
std::string HARNESS_EXPORT foreground (Color c)
 get 'change foreground color' ESC sequence. More...
 
std::string HARNESS_EXPORT foreground (const Rgb &rgb)
 get 'change foreground color' ESC sequence. More...
 
std::string HARNESS_EXPORT foreground (uint8_t ndx)
 get 'change foreground color ESC' sequence. More...
 
std::string HARNESS_EXPORT background (Color c)
 get 'change background color' ESC sequence. More...
 
std::string HARNESS_EXPORT background (const Rgb &rgb)
 get 'change background color' ESC sequence. More...
 
std::string HARNESS_EXPORT background (uint8_t ndx)
 get 'change background color' ESC sequence. More...
 
std::string HARNESS_EXPORT reset ()
 get 'reset attributes' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_up (Vt100::value_type n=1)
 get 'cursor up' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_down (Vt100::value_type n=1)
 get 'cursor down' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_forward (Vt100::value_type n=1)
 get 'cursor forward' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_back (Vt100::value_type n=1)
 get 'cursor back' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_next_line (Vt100::value_type n=1)
 get 'cursor next line' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_prev_line (Vt100::value_type n=1)
 get 'cursor previous line' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_abs_col (Vt100::value_type col=1)
 get 'set cursor absolute position' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_abs_row (Vt100::value_type row=1)
 get 'set cursor absolute row' ESC sequence. More...
 
std::string HARNESS_EXPORT cursor_abs_pos (Vt100::value_type row=1, Vt100::value_type col=1)
 get 'set cursor to absolute row' ESC sequence. More...
 
std::string HARNESS_EXPORT erase_in_display (Vt100::Erase n=Vt100::Erase::LeftAndCur)
 get 'erase in display' ESC sequence. More...
 
std::string HARNESS_EXPORT erase_in_line (Vt100::Erase n=Vt100::Erase::LeftAndCur)
 get 'erase in line' ESC sequence. More...
 
std::string HARNESS_EXPORT scroll_up (Vt100::value_type n=1)
 get 'scroll up' ESC sequence. More...
 
std::string HARNESS_EXPORT scroll_down (Vt100::value_type n=1)
 get 'scroll down' ESC sequence. More...
 
std::string HARNESS_EXPORT save_cursor_pos ()
 get 'save cursor position' ESC sequence. More...
 
std::string HARNESS_EXPORT restore_cursor_pos ()
 get 'restore cursor position' ESC sequence. More...
 
std::string HARNESS_EXPORT window_title (const std::string &title)
 get 'set window title' ESC sequence. More...
 
template<Vt100::value_type N>
static std::string not_num_to_string (Vt100::value_type n)
 
static std::string csi (Csi c, const std::string &s)
 
static std::string csi (Csi c)
 
template<Vt100::value_type DEF>
static std::string csi_default (Csi c, Vt100::value_type n)
 
template<Vt100::value_type DEF, size_t N>
static std::string csi_default (Csi c, const std::array< Vt100::value_type, N > &fields)
 
static std::string render (Vt100::value_type n)
 VT100, 7-bit colors. More...
 
template<Vt100::value_type DEF, size_t N>
static std::string render (const std::array< Vt100::value_type, N > &fields)
 

Variables

constexpr const char BEL {0x07}
 
constexpr const char CSI [] {ESC "["}
 
constexpr const char OSC [] {ESC "]"}
 

Typedef Documentation

◆ Rgb

using Vt100::Rgb = typedef std::array<uint8_t, 3>

◆ value_type

using Vt100::value_type = typedef uint16_t

Enumeration Type Documentation

◆ Color

enum Vt100::Color
strong

colors as used in Render.

Enumerator
Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 
BrightBlack 
BrightRed 
BrightGreen 
BrightYellow 
BrightBlue 
BrightMagenta 
BrightCyan 
BrightWhite 

◆ Csi

enum Vt100::Csi
strong
Enumerator
ICH 
CUU 
CUD 
CUF 
CUB 
CNL 
CPL 
CHA 
CUP 
CHT 
ED 
EL 
IL 
DL 
DCH 
SU 
SD 
ECH 
CBT 
DA 
VPA 
HVP 
TBC 
SM 
MC 
RM 
SGR 
DSR 
STR 
DECSTBM 
SC 
DECRARA 
SR 
DECCRA 
DECEFR 
DECREQTPARM 
DECERA 
DECSLE 
DECRQLP 

◆ Erase

enum Vt100::Erase
strong
Enumerator
LeftAndCur 
RightAndCur 
All 

◆ Render

enum Vt100::Render
strong

types of "Character Attributes".

Enumerator
Default 
Bold 
Faint 
Italic 
Underline 
SlowBlink 
RapidBlink 
Inverse 
Conceal 
CrossedOut 
FontDefault 
Font1 
Font2 
Font3 
Font4 
Font5 
Font6 
Font7 
Font8 
Font9 
Fraktur 
DoublyUnderline 
Normal 
NoItalic 
NoUnderline 
NoBlink 
NoInverse 
NoConceal 
NoCrossedOut 
ForegroundBlack 
ForegroundRed 
ForegroundGreen 
ForegroundYellow 
ForegroundBlue 
ForegroundMagenta 
ForegroundCyan 
ForegroundWhite 
ForegroundExtended 
ForegroundDefault 
BackgroundBlack 
BackgroundRed 
BackgroundGreen 
BackgroundYellow 
BackgroundBlue 
BackgroundMagenta 
BackgroundCyan 
BackgroundWhite 
BackgroundExtended 
BackgroundDefault 
Framed 
Encircled 
Overlined 
NotFramed 
NotOverlined 
IdeogramUnderline 
IdeogramDoubleUnderline 
IdeogramOverline 
IdeogramDoubleOverline 
IdeogramStressMarking 
NoIdeogram 
ForegroundBrightBlack 
ForegroundBrightRed 
ForegroundBrightGreen 
ForegroundBrightYellow 
ForegroundBrightBlue 
ForegroundBrightMagenta 
ForegroundBrightCyan 
ForegroundBrightWhite 
BackgroundBrightBlack 
BackgroundBrightRed 
BackgroundBrightGreen 
BackgroundBrightYellow 
BackgroundBrightBlue 
BackgroundBrightMagenta 
BackgroundBrightCyan 
BackgroundBrightWhite 

Function Documentation

◆ background() [1/3]

std::string Vt100::background ( Color  c)

get 'change background color' ESC sequence.

◆ background() [2/3]

std::string Vt100::background ( const Rgb rgb)

get 'change background color' ESC sequence.

◆ background() [3/3]

std::string Vt100::background ( uint8_t  ndx)

get 'change background color' ESC sequence.

◆ csi() [1/2]

static std::string Vt100::csi ( Csi  c,
const std::string &  s 
)
static

◆ csi() [2/2]

static std::string Vt100::csi ( Csi  c)
static

◆ csi_default() [1/2]

template<Vt100::value_type DEF>
static std::string Vt100::csi_default ( Csi  c,
Vt100::value_type  n 
)
static

◆ csi_default() [2/2]

template<Vt100::value_type DEF, size_t N>
static std::string Vt100::csi_default ( Csi  c,
const std::array< Vt100::value_type, N > &  fields 
)
static

◆ cursor_abs_col()

std::string Vt100::cursor_abs_col ( Vt100::value_type  col = 1)

get 'set cursor absolute position' ESC sequence.

◆ cursor_abs_pos()

std::string Vt100::cursor_abs_pos ( Vt100::value_type  row = 1,
Vt100::value_type  col = 1 
)

get 'set cursor to absolute row' ESC sequence.

◆ cursor_abs_row()

std::string Vt100::cursor_abs_row ( Vt100::value_type  row = 1)

get 'set cursor absolute row' ESC sequence.

◆ cursor_back()

std::string Vt100::cursor_back ( Vt100::value_type  n = 1)

get 'cursor back' ESC sequence.

◆ cursor_down()

std::string Vt100::cursor_down ( Vt100::value_type  n = 1)

get 'cursor down' ESC sequence.

◆ cursor_forward()

std::string Vt100::cursor_forward ( Vt100::value_type  n = 1)

get 'cursor forward' ESC sequence.

◆ cursor_next_line()

std::string Vt100::cursor_next_line ( Vt100::value_type  n = 1)

get 'cursor next line' ESC sequence.

◆ cursor_prev_line()

std::string Vt100::cursor_prev_line ( Vt100::value_type  n = 1)

get 'cursor previous line' ESC sequence.

◆ cursor_up()

std::string Vt100::cursor_up ( Vt100::value_type  n = 1)

get 'cursor up' ESC sequence.

◆ erase_in_display()

std::string Vt100::erase_in_display ( Vt100::Erase  n = Vt100::Erase::LeftAndCur)

get 'erase in display' ESC sequence.

◆ erase_in_line()

std::string Vt100::erase_in_line ( Vt100::Erase  n = Vt100::Erase::LeftAndCur)

get 'erase in line' ESC sequence.

◆ foreground() [1/3]

std::string Vt100::foreground ( Color  c)

get 'change foreground color' ESC sequence.

◆ foreground() [2/3]

std::string Vt100::foreground ( const Rgb rgb)

get 'change foreground color' ESC sequence.

◆ foreground() [3/3]

std::string Vt100::foreground ( uint8_t  ndx)

get 'change foreground color ESC' sequence.

◆ not_num_to_string()

template<Vt100::value_type N>
static std::string Vt100::not_num_to_string ( Vt100::value_type  n)
static

◆ render() [1/3]

static std::string Vt100::render ( Vt100::value_type  n)
static

VT100, 7-bit colors.

◆ render() [2/3]

template<Vt100::value_type DEF, size_t N>
static std::string Vt100::render ( const std::array< Vt100::value_type, N > &  fields)
static

◆ render() [3/3]

std::string Vt100::render ( Render  r)

get 'text rendering attributes' ESC sequence.

SGR

◆ reset()

std::string Vt100::reset ( )

get 'reset attributes' ESC sequence.

◆ restore_cursor_pos()

std::string Vt100::restore_cursor_pos ( )

get 'restore cursor position' ESC sequence.

◆ save_cursor_pos()

std::string Vt100::save_cursor_pos ( )

get 'save cursor position' ESC sequence.

◆ scroll_down()

std::string Vt100::scroll_down ( Vt100::value_type  n = 1)

get 'scroll down' ESC sequence.

◆ scroll_up()

std::string Vt100::scroll_up ( Vt100::value_type  n = 1)

get 'scroll up' ESC sequence.

◆ window_title()

std::string Vt100::window_title ( const std::string &  title)

get 'set window title' ESC sequence.

Variable Documentation

◆ BEL

constexpr const char Vt100::BEL {0x07}

◆ CSI

constexpr const char Vt100::CSI[] {ESC "["}

◆ OSC

constexpr const char Vt100::OSC[] {ESC "]"}