Horizon
|
RAII wrapper around writing specific colour of text using specific colour impl into a stream. More...
#include <catch_amalgamated.hpp>
Public Member Functions | |
ColourGuard (Colour::Code code, ColourImpl const *colour) | |
Does not engage the guard/start the colour. | |
ColourGuard (ColourGuard const &rhs)=delete | |
ColourGuard & | operator= (ColourGuard const &rhs)=delete |
ColourGuard (ColourGuard &&rhs) noexcept | |
ColourGuard & | operator= (ColourGuard &&rhs) noexcept |
~ColourGuard () | |
Removes colour if the guard was engaged. | |
ColourGuard & | engage (std::ostream &stream) & |
Explicitly engages colour for given stream. | |
ColourGuard && | engage (std::ostream &stream) && |
Explicitly engages colour for given stream. | |
Friends | |
std::ostream & | operator<< (std::ostream &lhs, ColourGuard &guard) |
Engages the guard and starts using colour. | |
std::ostream & | operator<< (std::ostream &lhs, ColourGuard &&guard) |
Engages the guard and starts using colour. | |
RAII wrapper around writing specific colour of text using specific colour impl into a stream.
ColourImpl::ColourGuard & Catch::ColourImpl::ColourGuard::engage | ( | std::ostream & | stream | ) | & |
Explicitly engages colour for given stream.
The API based on operator<< should be preferred.
ColourImpl::ColourGuard && Catch::ColourImpl::ColourGuard::engage | ( | std::ostream & | stream | ) | && |
Explicitly engages colour for given stream.
The API based on operator<< should be preferred.