Add Phrases::SubError and Phrases::SubWarning
This commit is contained in:
parent
82816d7653
commit
ec39e2f5d2
|
@ -136,7 +136,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
||||||
set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parser, IO and conversion utilities")
|
set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parser, IO and conversion utilities")
|
||||||
set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local)
|
set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local)
|
||||||
set(META_VERSION_MAJOR 4)
|
set(META_VERSION_MAJOR 4)
|
||||||
set(META_VERSION_MINOR 16)
|
set(META_VERSION_MINOR 17)
|
||||||
set(META_VERSION_PATCH 0)
|
set(META_VERSION_PATCH 0)
|
||||||
|
|
||||||
# find required 3rd party libraries
|
# find required 3rd party libraries
|
||||||
|
|
|
@ -90,6 +90,18 @@ std::ostream &operator<<(std::ostream &stream, Phrases phrase)
|
||||||
eraseLine(stream);
|
eraseLine(stream);
|
||||||
stream << '\r';
|
stream << '\r';
|
||||||
break;
|
break;
|
||||||
|
case Phrases::SubError:
|
||||||
|
setStyle(stream, Color::Red, ColorContext::Foreground, TextAttribute::Bold);
|
||||||
|
stream << " -> ERROR: ";
|
||||||
|
setStyle(stream, TextAttribute::Reset);
|
||||||
|
setStyle(stream, TextAttribute::Bold);
|
||||||
|
break;
|
||||||
|
case Phrases::SubWarning:
|
||||||
|
setStyle(stream, Color::Yellow, ColorContext::Foreground, TextAttribute::Bold);
|
||||||
|
stream << " -> WARNING: ";
|
||||||
|
setStyle(stream, TextAttribute::Reset);
|
||||||
|
setStyle(stream, TextAttribute::Bold);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,12 +138,14 @@ enum class Phrases {
|
||||||
End, /**< resets the style */
|
End, /**< resets the style */
|
||||||
PlainMessage, /**< bold, 4 spaces " " */
|
PlainMessage, /**< bold, 4 spaces " " */
|
||||||
SuccessMessage, /**< bold, green "==> " */
|
SuccessMessage, /**< bold, green "==> " */
|
||||||
SubMessage, /**< bold, blue " -> " */
|
SubMessage, /**< bold, green " -> " */
|
||||||
ErrorMessage, /**< bold, red "==> ERROR: " */
|
ErrorMessage, /**< bold, red "==> ERROR: " */
|
||||||
WarningMessage, /**< bold, yellow "==> WARNING: " */
|
WarningMessage, /**< bold, yellow "==> WARNING: " */
|
||||||
EndFlush, /**< resets the style and flushes the stream */
|
EndFlush, /**< resets the style and flushes the stream */
|
||||||
Info, /**< bold, blue "Info: " */
|
Info, /**< bold, blue "Info: " */
|
||||||
Override, /**< erases the current line */
|
Override, /**< erases the current line */
|
||||||
|
SubError, /**< bold, red " -> ERROR: " */
|
||||||
|
SubWarning, /**< bold, yellow " -> WARNING: " */
|
||||||
};
|
};
|
||||||
CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &stream, Phrases phrase);
|
CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &stream, Phrases phrase);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue