regina::i18n::IConvStream Class Reference
[Utilities]
An output stream that converts between character encodings.
More...
#include <i18nutils.h>
List of all members.
|
Public Member Functions |
| IConvStream (std::ostream &dest, const char *srcCode, const char *destCode) |
| Creates a new IConvStream; see the class notes for details.
|
Detailed Description
An output stream that converts between character encodings.
The iconv library does all the work behind the scenes.
An IConvStream acts as a wrapper around some other destination output stream (for instance, std::cout). To use an IConvStream:
- Construct it, passing the destination output stream and the to/from character encodings to the class constructor;
- Write data to this IConvStream, which will be converted and forwarded on to the destination output stream;
- Destroy this IConvStream. The destination output stream will remain open.
This class will still work if iconv is not supported on the build machine, though in this case it will simply pass data straight through to the destination output stream without any conversion.
- Python:
- Not present.
- Author:
- Parts of this code are modified from the cxxtools library (
http://www.tntnet.org/cxxutils.html
), which is copyright (c) 2003 by Tommi Maekitalo, and covered by the GNU Lesser General Public License.
The documentation for this class was generated from the following file: