clStreamBufSwapper Class Reference

Smart class that will swap streambufs and replace them when object goes out of scope. More...

#include <ParsingFunctions.h>

List of all members.

Public Member Functions

 clStreamBufSwapper (ostream &orig, fstream &replacement)
 Constructor.
 ~clStreamBufSwapper ()
 Destructor.

Private Attributes

std::streambuf * buf_
 One buffer.
std::ostream & str_
 The other buffer.


Detailed Description

Smart class that will swap streambufs and replace them when object goes out of scope.

I stole this from somewhere but I don't remember where.


Constructor & Destructor Documentation

clStreamBufSwapper::clStreamBufSwapper ostream &  orig,
fstream &  replacement
[inline]
 

Constructor.

Swaps two stream buffers so that the streams write to each other's buffers.

Parameters:
orig Stream one.
replacement Stream two.

clStreamBufSwapper::~clStreamBufSwapper  )  [inline]
 

Destructor.

Swaps the stream buffers back.


The documentation for this class was generated from the following file:
Generated on Thu Jan 26 13:44:54 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.6-NO