Opened 14 years ago

Closed 14 years ago

#520 closed request (fixed)

A class to redirect streams easily.

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.6
Component: utility Version: trunk
Keywords: Cc:

Description

A use case would be

NewClass(std::cerr, my_ofstream);

after which all output to std::cerr is sent to the buffer of my_ofstream. std::cerr is restored in destructor.

Change History (2)

comment:1 Changed 14 years ago by Peter

Owner: changed from Jari Häkkinen to Peter
Status: newassigned

I have a suggestion of an implementation almost ready to fly (only need to improve the docs). I wonder if anyone has preferences regarding the name of this class? I'm thinking of StreamSwitcher, StreamDirector, or StreamRedirector but is not very happy about any of them. Ideas?

comment:2 Changed 14 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [2047]) closes #520 and refs #521. Implements the interface defined in #520 which should be extended to also include the interface discussed in #521

Note: See TracTickets for help on using tickets.