Add phrase for overriding current line

This commit is contained in:
Martchus 2018-04-01 23:08:31 +02:00
parent 76ee4a158b
commit 8bc3cf9615
2 changed files with 5 additions and 0 deletions

View File

@ -86,6 +86,10 @@ std::ostream &operator<<(std::ostream &stream, Phrases phrase)
setStyle(stream, TextAttribute::Reset); setStyle(stream, TextAttribute::Reset);
setStyle(stream, TextAttribute::Bold); setStyle(stream, TextAttribute::Bold);
break; break;
case Phrases::Override:
eraseLine(stream);
stream << '\r';
break;
} }
return stream; return stream;
} }

View File

@ -141,6 +141,7 @@ enum class Phrases {
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 */
}; };
CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &stream, Phrases phrase); CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &stream, Phrases phrase);