TPIE

2362a60
tpie::close_on_fail_guard Class Reference

Implementation helper that closes the stream if a method exits by throwing an exception. More...

#include <tpie/compressed/stream.h>

Public Member Functions

 close_on_fail_guard (compressed_stream_base *s)
 
void commit ()
 

Detailed Description

Implementation helper that closes the stream if a method exits by throwing an exception.

At every proper exit point from the method, commit() must be called. If the method exits without committing, close() is called. Care should be taken to ensure that the compressor lock is not held when this object is destructed!

Definition at line 470 of file stream.h.


The documentation for this class was generated from the following file: