Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  
QP::Encoder Class Reference

quoted-printable encoder More...

#include <qp.h>

Inheritance diagram for QP::Encoder:
buffered_codec codec

Public Member Functions

double codeSizeMultiplier () const
 Encoder (bool isBinary=false)
const char * name () const
size_t maxlen ()
void maxlen (size_t i)
template<typename InIt, typename OutIt>
void process (InIt bit, InIt eit, OutIt out)
template<typename OutIt>
void process (char_type ic, OutIt &out)
template<typename OutIt>
void flush (OutIt &out)

Additional Inherited Members

Public Types inherited from buffered_codec
typedef buffered_codec_type_tag codec_type
Public Types inherited from codec
typedef unsigned char char_type

Detailed Description

quoted-printable encoder

See also
encode decode

Constructor & Destructor Documentation

◆ Encoder()

Encoder ( bool isBinary = false)
inline

Constructor

Parameters
isBinaryif true all space and newline characters will be treated like binary chars and will be hex encoded (useful if you want to encode a binary file).

Member Function Documentation

◆ codeSizeMultiplier()

double codeSizeMultiplier ( ) const
inlinevirtual

return the multiplier of the required (max) size of the output buffer when encoding

Reimplemented from codec.

◆ flush()

template<typename OutIt>
void flush ( OutIt & out)
inline

Write to out any buffered encoded char.

Referenced by process().

◆ maxlen() [1/2]

size_t maxlen ( )
inline

Returns the max line length

◆ maxlen() [2/2]

void maxlen ( size_t i)
inline

Set the max line length. No more then i chars will be printed on one line.

◆ name()

const char * name ( ) const
inlinevirtual

Returns the name of the codec ("Quoted-Printable")

Implements codec.

◆ process() [1/2]

template<typename OutIt>
void process ( char_type ic,
OutIt & out )
inline

Encodes ic and write any encoded output char to out.

Warning
You must call flush() when all chars have been processed by the encode funcion.
while( (c = getchar()) != EOF )
qp.process(c, out);
qp.flush();

See also
flush()

◆ process() [2/2]

template<typename InIt, typename OutIt>
void process ( InIt bit,
InIt eit,
OutIt out )
inline

Encodes [bit,eit) and write any encoded char to out.

References flush(), and process().

Referenced by process().


The documentation for this class was generated from the following file: