Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

Base64::Encoder Class Reference

Base64 encoder. More...

#include <base64.h>

Inheritance diagram for Base64::Encoder:

buffered_codec codec

List of all members.

Public Member Functions

double codeSizeMultiplier () const
 Encoder (int maxlen=default_maxlen)
const char * name () const
template<typename InIt, typename OutIt>
void process (InIt bit, InIt eit, OutIt out)
template<typename OutIt>
void process (char_type c, OutIt &out)
template<typename OutIt>
void flush (OutIt &out)


Detailed Description

Base64 encoder.

See also:
encode decode

Constructor & Destructor Documentation

Encoder ( int  maxlen = default_maxlen  )  [inline]

Constructor, maxlen is the maximum length of every encoded line


Member Function Documentation

double codeSizeMultiplier (  )  const [inline, virtual]

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

Reimplemented from codec.

const char* name (  )  const [inline, virtual]

Returns the name of the codec ("Base64")

Implements codec.

void process ( InIt  bit,
InIt  eit,
OutIt  out 
) [inline]

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

void process ( char_type  c,
OutIt &  out 
) [inline]

Encodes c 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 )
            b64.encode(c, out);    
        b64.flush();

See also:
flush()

void flush ( OutIt &  out  )  [inline]

Write to out any buffered encoded char.


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