A transcode::streambuf is-a std::streambuf for transcoding character encodings from/to UTF-8 on-the-fly. More...
#include <zorba/transcode_stream.h>
Inherits streambuf.
Public Member Functions | |
| std::streambuf * | orig_streambuf () const |
| Gets the original streambuf. More... | |
| streambuf (char const *charset, std::streambuf *orig) | |
| Constructs a transcode::streambuf. More... | |
| ~streambuf () | |
| Destructs a transcode::streambuf. More... | |
Protected Member Functions | |
| void | imbue (std::locale const &) |
| int_type | overflow (int_type) |
| int_type | pbackfail (int_type) |
| pos_type | seekoff (off_type, std::ios_base::seekdir, std::ios_base::openmode) |
| pos_type | seekpos (pos_type, std::ios_base::openmode) |
| std::streambuf * | setbuf (char_type *, std::streamsize) |
| std::streamsize | showmanyc () |
| int | sync () |
| int_type | uflow () |
| int_type | underflow () |
| std::streamsize | xsgetn (char_type *, std::streamsize) |
| std::streamsize | xsputn (char_type const *, std::streamsize) |
A transcode::streambuf is-a std::streambuf for transcoding character encodings from/to UTF-8 on-the-fly.
To use it, replace a stream's streambuf:
Note that the transcode::streambuf must exist for as long as it's being used by the stream. If you are replacing the streabuf for a stream you did not create, you should set it back to the original streambuf:
Alternatively, you may wish to use either attach(), auto_attach, or transcode::stream instead.
While transcode::streambuf does support seeking, the positions are relative to the original byte stream.
Definition at line 70 of file transcode_stream.h.
| zorba::transcode::streambuf::streambuf | ( | char const * | charset, |
| std::streambuf * | orig | ||
| ) |
Constructs a transcode::streambuf.
| charset | The name of the character encoding to convert from/to. |
| orig | The original streambuf to read/write from/to. |
| std::invalid_argument | if either charset is not supported or orig is null. |
| zorba::transcode::streambuf::~streambuf | ( | ) |
Destructs a transcode::streambuf.
|
protected |
|
inline |
Gets the original streambuf.
Definition at line 92 of file transcode_stream.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |