ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::lox::ESC Class Reference

Description:

This class defines "escape sequences" that influence the formatting of log output. Specific implementations of class Logger have to convert or interpret this classes definitions of escape sequences when processing log data. If no formatting of the output is supported by a specific Logger implementation, such logger should filter and discard escape sequences defined here.

The sequences are similar to ANSI Escape sequences and logger classes that log to 'VT100' compatible terminals will simply convert them.

The name of the class was intentionally chosen to be short, because the escape codes defined with this class will be concatenated to log strings like that:

Log_Info( "The result is: ", ESC::RED, 42 )
Note
With the introduction of own, ALox specific escape codes, software that uses ALox becomes independent of any underlying, platform-specific sequences. For example, ALox is not relying on ANSI color codes, which are not supported by colorful Windows consoles. Instead, on each platform, dedicated Loggers will perform the translation of ALox codes to platform-specific ones.

Definition at line 156 of file alox_init.inl.

Public Static Field Index:

static constexpr character BG_BLACK [4] { A_CHAR("\033C6") }
 Select red color for background.
 
static constexpr character BG_BLUE [4] { A_CHAR("\033C3") }
 Select blue color for background.
 
static constexpr character BG_CYAN [4] { A_CHAR("\033C5") }
 Select blue color for background.
 
static constexpr character BG_GRAY [4] { A_CHAR("\033C8") }
 Select gray color for background.
 
static constexpr character BG_GREEN [4] { A_CHAR("\033C1") }
 Select green color for background.
 
static constexpr character BG_MAGENTA [4] { A_CHAR("\033C4") }
 Select blue color for background.
 
static constexpr character BG_RED [4] { A_CHAR("\033C0") }
 Select red color for background.
 
static constexpr character BG_RESET [4] { A_CHAR("\033C9") }
 Select std color for background.
 
static constexpr character BG_WHITE [4] { A_CHAR("\033C7") }
 Select blue color for background.
 
static constexpr character BG_YELLOW [4] { A_CHAR("\033C2") }
 Select yellow color for background.
 
static constexpr character BLACK [4] { A_CHAR("\033c6") }
 Select black color for foreground.
 
static constexpr character BLUE [4] { A_CHAR("\033c3") }
 Select blue color for foreground.
 
static constexpr character BOLD [4] { A_CHAR("\033sB") }
 Select bold font style.
 
static constexpr character CYAN [4] { A_CHAR("\033c5") }
 Select cyan color for foreground.
 
static constexpr character EOMETA [4] { A_CHAR("\033A0") }
 End of meta-information in log string.
 
static constexpr character FG_RESET [4] { A_CHAR("\033c9") }
 Select std color for foreground.
 
static constexpr character GRAY [4] { A_CHAR("\033c8") }
 Select gray color for foreground.
 
static constexpr character GREEN [4] { A_CHAR("\033c1") }
 Select green color for foreground.
 
static constexpr character ITALICS [4] { A_CHAR("\033sI") }
 Select italics font style.
 
static constexpr character MAGENTA [4] { A_CHAR("\033c4") }
 Select magenta color for foreground.
 
static constexpr character RED [4] { A_CHAR("\033c0") }
 Select red color for foreground.
 
static constexpr character RESET [4] { A_CHAR("\033sa") }
 Reset color and style.
 
static constexpr character STYLE_RESET [4] { A_CHAR("\033sr") }
 Select standard font style.
 
static constexpr character TAB [4] { A_CHAR("\033t0") }
 Go to next tab. Usually, text loggers will increase the tab position automatically.
 
static constexpr character URL_END [4] { A_CHAR("\033lE") }
 Mark the end of an URL.
 
static constexpr character URL_START [4] { A_CHAR("\033lS") }
 Mark the start of an URL.
 
static constexpr character WHITE [4] { A_CHAR("\033c7") }
 Select white color for foreground.
 
static constexpr character YELLOW [4] { A_CHAR("\033c2") }
 Select yellow color for foreground.
 

Public Static Method Index:

static ALIB_DLL void ReplaceToReadable (AString &target, integer startIdx)
 

Field Details:

◆ BG_BLACK

character alib::lox::ESC::BG_BLACK[4] { A_CHAR("\033C6") }
staticconstexpr

Select red color for background.

Definition at line 176 of file alox_init.inl.

◆ BG_BLUE

character alib::lox::ESC::BG_BLUE[4] { A_CHAR("\033C3") }
staticconstexpr

Select blue color for background.

Definition at line 173 of file alox_init.inl.

◆ BG_CYAN

character alib::lox::ESC::BG_CYAN[4] { A_CHAR("\033C5") }
staticconstexpr

Select blue color for background.

Definition at line 175 of file alox_init.inl.

◆ BG_GRAY

character alib::lox::ESC::BG_GRAY[4] { A_CHAR("\033C8") }
staticconstexpr

Select gray color for background.

Definition at line 178 of file alox_init.inl.

◆ BG_GREEN

character alib::lox::ESC::BG_GREEN[4] { A_CHAR("\033C1") }
staticconstexpr

Select green color for background.

Definition at line 171 of file alox_init.inl.

◆ BG_MAGENTA

character alib::lox::ESC::BG_MAGENTA[4] { A_CHAR("\033C4") }
staticconstexpr

Select blue color for background.

Definition at line 174 of file alox_init.inl.

◆ BG_RED

character alib::lox::ESC::BG_RED[4] { A_CHAR("\033C0") }
staticconstexpr

Select red color for background.

Definition at line 170 of file alox_init.inl.

◆ BG_RESET

character alib::lox::ESC::BG_RESET[4] { A_CHAR("\033C9") }
staticconstexpr

Select std color for background.

Definition at line 179 of file alox_init.inl.

◆ BG_WHITE

character alib::lox::ESC::BG_WHITE[4] { A_CHAR("\033C7") }
staticconstexpr

Select blue color for background.

Definition at line 177 of file alox_init.inl.

◆ BG_YELLOW

character alib::lox::ESC::BG_YELLOW[4] { A_CHAR("\033C2") }
staticconstexpr

Select yellow color for background.

Definition at line 172 of file alox_init.inl.

◆ BLACK

character alib::lox::ESC::BLACK[4] { A_CHAR("\033c6") }
staticconstexpr

Select black color for foreground.

Definition at line 165 of file alox_init.inl.

◆ BLUE

character alib::lox::ESC::BLUE[4] { A_CHAR("\033c3") }
staticconstexpr

Select blue color for foreground.

Definition at line 162 of file alox_init.inl.

◆ BOLD

character alib::lox::ESC::BOLD[4] { A_CHAR("\033sB") }
staticconstexpr

Select bold font style.

Definition at line 181 of file alox_init.inl.

◆ CYAN

character alib::lox::ESC::CYAN[4] { A_CHAR("\033c5") }
staticconstexpr

Select cyan color for foreground.

Definition at line 164 of file alox_init.inl.

◆ EOMETA

character alib::lox::ESC::EOMETA[4] { A_CHAR("\033A0") }
staticconstexpr

End of meta-information in log string.

Definition at line 190 of file alox_init.inl.

◆ FG_RESET

character alib::lox::ESC::FG_RESET[4] { A_CHAR("\033c9") }
staticconstexpr

Select std color for foreground.

Definition at line 168 of file alox_init.inl.

◆ GRAY

character alib::lox::ESC::GRAY[4] { A_CHAR("\033c8") }
staticconstexpr

Select gray color for foreground.

Definition at line 167 of file alox_init.inl.

◆ GREEN

character alib::lox::ESC::GREEN[4] { A_CHAR("\033c1") }
staticconstexpr

Select green color for foreground.

Definition at line 160 of file alox_init.inl.

◆ ITALICS

character alib::lox::ESC::ITALICS[4] { A_CHAR("\033sI") }
staticconstexpr

Select italics font style.

Definition at line 182 of file alox_init.inl.

◆ MAGENTA

character alib::lox::ESC::MAGENTA[4] { A_CHAR("\033c4") }
staticconstexpr

Select magenta color for foreground.

Definition at line 163 of file alox_init.inl.

◆ RED

character alib::lox::ESC::RED[4] { A_CHAR("\033c0") }
staticconstexpr

Select red color for foreground.

Definition at line 159 of file alox_init.inl.

◆ RESET

character alib::lox::ESC::RESET[4] { A_CHAR("\033sa") }
staticconstexpr

Reset color and style.

Definition at line 184 of file alox_init.inl.

◆ STYLE_RESET

character alib::lox::ESC::STYLE_RESET[4] { A_CHAR("\033sr") }
staticconstexpr

Select standard font style.

Definition at line 183 of file alox_init.inl.

◆ TAB

character alib::lox::ESC::TAB[4] { A_CHAR("\033t0") }
staticconstexpr

Go to next tab. Usually, text loggers will increase the tab position automatically.

Definition at line 188 of file alox_init.inl.

◆ URL_END

character alib::lox::ESC::URL_END[4] { A_CHAR("\033lE") }
staticconstexpr

Mark the end of an URL.

Definition at line 187 of file alox_init.inl.

◆ URL_START

character alib::lox::ESC::URL_START[4] { A_CHAR("\033lS") }
staticconstexpr

Mark the start of an URL.

Definition at line 186 of file alox_init.inl.

◆ WHITE

character alib::lox::ESC::WHITE[4] { A_CHAR("\033c7") }
staticconstexpr

Select white color for foreground.

Definition at line 166 of file alox_init.inl.

◆ YELLOW

character alib::lox::ESC::YELLOW[4] { A_CHAR("\033c2") }
staticconstexpr

Select yellow color for foreground.

Definition at line 161 of file alox_init.inl.

Method Details:

◆ ReplaceToReadable()

void alib::lox::ESC::ReplaceToReadable ( AString & target,
integer startIdx )
static

Replaces ESC codes in a string reversely to "ESC::XXX".

Parameters
targetThe string to replace in.
startIdxThe index to start searching for ESC codes.

Definition at line 48 of file aloxinit.cpp.

Here is the call graph for this function:

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