MySQL 9.1.0
Source Code Documentation
Vt100 Namespace Reference

Namespaces

namespace  anonymous_namespace{vt100.h}
 

Typedefs

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

Enumerations

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

◆ Render

enum class 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)
static

◆ csi() [2/2]

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

◆ csi_default() [1/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

◆ csi_default() [2/2]

template<Vt100::value_type DEF>
static std::string Vt100::csi_default ( Csi  c,
Vt100::value_type  n 
)
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]

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

◆ render() [2/3]

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

get 'text rendering attributes' ESC sequence.

SGR

◆ render() [3/3]

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

VT100, 7-bit colors.

◆ 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}
constexpr

◆ CSI

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

◆ OSC

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