Public Member Functions | Private Attributes

lg::tredirect_output_setter Class Reference

Helper class to redirect the output of the logger in a certain scope. More...

#include <log.hpp>

Collaboration diagram for lg::tredirect_output_setter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tredirect_output_setter (std::ostream &stream)
 Constructor.
 ~tredirect_output_setter ()

Private Attributes

std::ostream * old_stream_
 The previously set redirection.

Detailed Description

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.


Constructor & Destructor Documentation

lg::tredirect_output_setter::tredirect_output_setter ( std::ostream &  stream  )  [explicit]

Constructor.

Parameters:
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.


Member Data Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:44 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs