#include <cxxtools/textstream.h>

Public Types | |
| typedef ByteT | extern_type |
| typedef CharT | intern_type |
| typedef CharT | char_type |
| typedef std::char_traits< CharT > | traits_type |
| typedef traits_type::int_type | int_type |
| typedef traits_type::pos_type | pos_type |
| typedef traits_type::off_type | off_type |
|
typedef std::basic_iostream < extern_type > | StreamType |
|
typedef TextCodec< char_type, extern_type > | CodecType |
Public Member Functions | |
| BasicTextStream (StreamType &ios, CodecType *codec) | |
| Construct by stream and codec. | |
| BasicTextStream (CodecType *codec) | |
| ~BasicTextStream () | |
| Deletes the codec. | |
| void | attach (StreamType &ios) |
| void | detach () |
| void | terminate () |
|
BasicTextBuffer< intern_type, extern_type > & | buffer () |
This class derives from std::basic_istream which is the super-class of input-stream classes. Stream classes are used to connect to an external device and transport characters from this external device.
The internal character set can be specified using the template parameters 'I', the external character set using 'E'. The external type is the input type and output type when reading from or writing to the external device. The internal type is the type which is used to internally store the data from the external device after the external format was converted using the Codec which is passed when constructing an object of this class.
The Codec object which is passed as pointer to the constructor will afterwards be managed by this class and also be deleted by this class when it's destructed!
| BasicTextStream | ( | StreamType & | ios, | |
| CodecType * | codec | |||
| ) |
The stream ios is used to read a character sequences and convert is using the codec codec and write character sequences which have been converted using the codec codec. The codec object which is passed as pointer will afterwards be managed by this class and be deleted on destruction