libkmime
KMime::Encoder Class Reference
#include <kmime_codecs.h>
Detailed Description
Stateful encoder class, modelled after QTextEncoder.Stateful encoder class.
- Author:
- Marc Mutz <mutz@kde.org>
Definition at line 300 of file kmime_codecs.h.
Public Member Functions | |
virtual | ~Encoder () |
virtual bool | encode (const char *&scursor, const char *const send, char *&dcursor, const char *const dend)=0 |
virtual bool | finish (char *&dcursor, const char *const dend)=0 |
Protected Types | |
enum | { maxBufferedChars = 8 } |
Protected Member Functions | |
Encoder (bool withCRLF=false) | |
bool | write (char ch, char *&dcursor, const char *const dend) |
bool | flushOutputBuffer (char *&dcursor, const char *const dend) |
bool | writeCRLF (char *&dcursor, const char *const dend) |
Protected Attributes | |
uchar | mOutputBufferCursor |
const bool | mWithCRLF |
Friends | |
class | Codec |
Member Enumeration Documentation
|
Space in the output buffer.
Definition at line 323 of file kmime_codecs.h. |
Constructor & Destructor Documentation
|
Protected constructor. Use KMime::Codec::makeEncoder if you want one. The bool parameter determines whether lines end with CRLF (true) or LF (false, default). Definition at line 306 of file kmime_codecs.h. |
Member Function Documentation
|
Encode a chunk of data, maintaining state information between calls. See KMime::Codec for calling conventions. |
|
Call this method to finalize the output stream. Writes all remaining data and resets the encoder. See KMime::Codec for calling conventions. |
|
Writes characters from the output buffer to the output stream. Implementations of encode and finish should call this at the very beginning and for each iteration of the while loop.
Definition at line 223 of file kmime_codecs.cpp. |
|
Writes
Definition at line 328 of file kmime_codecs.h. |
|
Convenience function. Outputs LF or CRLF, based on the state of mWithCRLF Definition at line 350 of file kmime_codecs.h. |
The documentation for this class was generated from the following files: