A transcode::auto_attach is a class that attaches a transcode::streambuf to a stream and automatically detaches it when the auto_attach object is destroyed. More...
#include <zorba/transcode_stream.h>
Public Member Functions | |
auto_attach (StreamType &stream, char const *charset) | |
Constructs an auto_attach object calling attach() on the given stream. | |
~auto_attach () | |
Destroys this auto_attach object calling detach() on the previously attached stream. |
A transcode::auto_attach is a class that attaches a transcode::streambuf to a stream and automatically detaches it when the auto_attach object is destroyed.
A transcode::auto_attach is useful for streams not created by you.
Definition at line 210 of file transcode_stream.h.
|
inline |
Constructs an auto_attach object calling attach() on the given stream.
stream | The stream to attach the transcode::streambuf to. If the stream already has a transcode::streambuf attached to it, this contructor does nothing. |
charset | The name of the character encoding to convert from/to. |
Definition at line 220 of file transcode_stream.h.
References zorba::transcode::attach().
|
inline |
Destroys this auto_attach object calling detach() on the previously attached stream.
Definition at line 228 of file transcode_stream.h.
References zorba::transcode::detach().