8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
20 module ALib.ALox.Impl;
23 import ALib.Strings.Tokenizer;
51 (void) useLightColors.
Define();
60 auto ansiLoggerDefaultFormat=
ALOX.GetResource(
"Var_D21A");
93 writer.
Write( actual );
102 writer.
Write( actual );
108 writer.
Write( actual );
120 if( c ==
'C' || c ==
'c' ) {
121 bool isForeGround= ( c==
'c' );
128 colNo+= isForeGround ? 0 : 10;
180 default:
ALIB_ERROR(
"ALOX",
"Error in ANSI Code" )
185 writer.
Write( ansiCol );
189 else if ( c ==
's' ) {
197 else if ( c ==
't' || c ==
'A' ) {
199 int extraSpace= c >=
'0' && c <=
'9' ? ( c -
'0' )
205 integer qtySpaces= tabStop - column;
206 writer.
Fill(
' ', qtySpaces );
static constexpr character ANSI_BLACK[6]
Select black as foreground color.
static constexpr character ANSI_BG_LIGHT_CYAN[11]
Select light cyan as background color.
static constexpr character ANSI_CYAN[6]
Select cyan as foreground color.
virtual ALIB_DLL void logText(detail::Domain &domain, Verbosity verbosity, AString &msg, detail::ScopeInfo &scope, int lineNumber, bool isRecursion) override
static constexpr character ANSI_BG_BLACK[6]
Select black as background color.
static constexpr character ANSI_BG_MAGENTA[6]
Select magenta as background color.
static constexpr character ANSI_WHITE[11]
Select white as foreground color.
static constexpr character ANSI_BG_YELLOW[6]
Select yellow as background color.
std::ostream & os
The output stream to use, provided with construction.
static constexpr character ANSI_BG_LIGHT_YELLOW[11]
Select light yellow as background color.
static constexpr character ANSI_BG_WHITE[11]
Select white as background color.
static constexpr character ANSI_YELLOW[6]
Select yellow as foreground color.
static constexpr character ANSI_BG_GREEN[6]
Select green as background color.
static constexpr character ANSI_BG_STD_COL[6]
Select standard background color.
static constexpr character ANSI_GRAY[12]
Select gray as foreground color.
static constexpr character ANSI_BG_GRAY[12]
Select gray as background color.
static constexpr character ANSI_GREEN[6]
Select green as foreground color.
static constexpr character ANSI_BG_RED[6]
Select red as background color.
textlogger::ColorfulLoggerParameters CFP
static constexpr character ANSI_MAGENTA[6]
Select magenta as foreground color.
static constexpr character ANSI_LIGHT_BLUE[11]
Select light blue as foreground color.
static constexpr character ANSI_BG_LIGHT_GRAY[12]
Select light gray as background color.
static constexpr character ANSI_BLUE[6]
Select blue as foreground color.
static constexpr character ANSI_LIGHT_MAGENTA[11]
Select light magenta as foreground color.
static constexpr character ANSI_LIGHT_GRAY[12]
Select light gray as foreground color.
static constexpr character ANSI_BOLD[5]
Select bold font style.
static constexpr character ANSI_BG_LIGHT_MAGENTA[11]
Select light magenta as background color.
static constexpr character ANSI_RESET[5]
Reset colors and font style.
static constexpr character ANSI_BG_CYAN[6]
Select cyan as background color.
static constexpr character ANSI_BG_LIGHT_BLUE[11]
Select light blue as background color.
static constexpr character ANSI_STD_COL[6]
Select standard foreground color.
static constexpr character ANSI_LIGHT_RED[11]
Select light red as foreground color.
static constexpr character ANSI_LIGHT_GREEN[11]
Select light green as foreground color.
static constexpr character ANSI_RED[6]
Select red as foreground color.
static constexpr character ANSI_BG_LIGHT_RED[11]
Select light red as background color.
static constexpr character ANSI_LIGHT_CYAN[11]
Select light cyan as foreground color.
static constexpr character ANSI_BG_BLUE[6]
Select blue as background color.
ALIB_DLL void AcknowledgeLox(detail::LoxImpl *lox, lang::ContainerOp op) override
static constexpr character ANSI_BG_LIGHT_GREEN[11]
Select light green as background color.
static constexpr character ANSI_LIGHT_YELLOW[11]
Select light yellow as foreground color.
static constexpr character ANSI_ITALICS[5]
Select italics font style.
virtual ALIB_DLL void AcknowledgeLox(detail::LoxImpl *lox, lang::ContainerOp op) override
FormatMetaInfo & GetFormatMetaInfo()
Variable varFormatMetaInfo
Variable varFormatAutoSizes
constexpr integer Length() const
TChar CharAtStart() const
integer IndexOf(TChar needle, integer startIdx=0) const
constexpr bool IsNotEmpty() const
constexpr const TChar * Buffer() const
integer WStringLength() const
TString< TChar > Substring(integer regionStart, integer regionLength=MAX_LEN) const
integer ConsumeChars(integer regionLength, TSubstring *target=nullptr)
void Write(const NString &src, integer *printedWidth=nullptr)
::std::ostream & GetStream()
void Fill(const TChar fillChar, integer count)
@ Tabstop
denotes a tab stop entry.
ALIB_DLL TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
TSubstring< TChar > Actual
ALIB_DLL bool Define(Priority requestedPriority=Priority::Standard)
#define ALIB_WARNING(domain,...)
#define ALIB_ASSERT_WARNING(cond, domain,...)
#define ALIB_ERROR(domain,...)
ContainerOp
Denotes standard container operations.
@ Insert
Denotes insertions.
@ Keep
Keep whitespaces in string.
@ CONSOLE_LIGHT_COLORS
Denotes configuration variable ALOX/CONSOLE_LIGHT_COLORS used by colorful specializations of class Te...
variables::Variable CampVariable(camp::Camp &camp)
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace alib.
strings::util::TTokenizer< character > Tokenizer
Type alias in namespace alib.
variables::Variable Variable
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
lox::ALoxCamp ALOX
The singleton instance of ALib Camp class ALoxCamp.
strings::TString< character > String
Type alias in namespace alib.
strings::compatibility::std::OStreamWriter< TChar, TAllocator, TSynced, TTargetLF > OStreamWriter
Type alias in namespace alib.
characters::character character
Type alias in namespace alib.
monomem::TLocalAllocator< 4 > LocalAllocator4K
Type alias in namespace alib. Allocates 4kB of stack memory.
strings::TSubstring< character > Substring
Type alias in namespace alib.
Parameters specific to colorful loggers. As of today, this simply has one attribute.
@ Foreground
Use light colors for foreground.
@ Never
Never use light colors.