Helper class to redirect the output of the logger in a certain scope. More...
#include <log.hpp>

Public Member Functions | |
| tredirect_output_setter (std::ostream &stream) | |
| Constructor. | |
| ~tredirect_output_setter () | |
Private Attributes | |
| std::ostream * | old_stream_ |
| The previously set redirection. | |
Helper class to redirect the output of the logger in a certain scope.
The main usage of the redirection is for the unit tests to validate the ourput on the logger with the expected output.
Definition at line 44 of file log.hpp.
| lg::tredirect_output_setter::tredirect_output_setter | ( | std::ostream & | stream | ) | [explicit] |
Constructor.
| stream | The stream to direct the output to. |
Definition at line 61 of file log.cpp.
References output_stream.
| lg::tredirect_output_setter::~tredirect_output_setter | ( | ) |
Definition at line 67 of file log.cpp.
References old_stream_, and output_stream.
std::ostream* lg::tredirect_output_setter::old_stream_ [private] |
The previously set redirection.
This value is stored here to be restored in this destructor.
Definition at line 64 of file log.hpp.
Referenced by ~tredirect_output_setter().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:44 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |