jigdo API

Base64Out< Output > Class Template Reference

Convert binary data to Base64 and output. More...

#include <mimestream.hh>

List of all members.


Public Member Functions

 Base64Out ()
Output::ResultType result ()
Base64Out< Output > & operator<< (char x)
 Output operators.
Base64Out< Output > & operator<< (signed char x)
Base64Out< Output > & operator<< (unsigned char x)
Base64Out< Output > & operator<< (int x)
 Output the low 8 bits of an integer.
Base64Out< Output > & operator<< (uint32 x)
 Output 32 bit integer in little-endian order.
Base64Out< Output > & operator<< (const char *x)
 Output null-terminated string.
Base64Out< Output > & operator<< (const signed char *x)
Base64Out< Output > & operator<< (const unsigned char *x)
Base64Out< Output > & operator<< (const void *x)
Base64Out< Output > & put (unsigned char x)
 Output 1 character.
Base64Out< Output > & put (signed char x)
Base64Out< Output > & put (int x)
 Output the low 8 bits of an integer.
Base64Out< Output > & put (char x)
Base64Out< Output > & put (uint32 x)
 Output 32 bit integer in little-endian order.
Base64Out< Output > & write (const char *x, unsigned n)
 Output n characters.
Base64Out< Output > & write (const signed char *x, unsigned n)
Base64Out< Output > & write (const unsigned char *x, unsigned n)
Base64Out< Output > & write (const void *x, unsigned n)
Base64Out< Output > & flush ()
 This is *not* a no-op.
Base64Out< Output > & trailer (streamsize n)
 Output the appropriate number of '=' characters (0, 1 or 2) given how many bytes were fed into the Base64Out<Output> object.

Static Public Attributes

static bool hex = false
 A bit of a hack for jigdo: If true, switch from Base64 output to hexadecimal output.

Detailed Description

template<class Output>
class Base64Out< Output >

Convert binary data to Base64 and output.

Note that this does not* implement the RFC2045 requirement that lines of text be no longer than 76 characters each. Furthermore, by default the data is not terminated with any '='.

Output is a class offering the following: void put(char c); // Output one ASCII character typedef implementation_defined ResultType; ResultType result(); // Is called by Base64Out::result()


Constructor & Destructor Documentation

template<class Output>
Base64Out< Output >::Base64Out (  )  [inline]


Member Function Documentation

template<class Output>
Output::ResultType Base64Out< Output >::result (  )  [inline]

Referenced by main(), and MD5::toString().

template<class Output>
Base64Out<Output>& Base64Out< Output >::operator<< ( char  x  )  [inline]

Output operators.

References Base64Out< Output >::put().

template<class Output>
Base64Out<Output>& Base64Out< Output >::operator<< ( signed char  x  )  [inline]

template<class Output>
Base64Out<Output>& Base64Out< Output >::operator<< ( unsigned char  x  )  [inline]

template<class Output>
Base64Out<Output>& Base64Out< Output >::operator<< ( int  x  )  [inline]

Output the low 8 bits of an integer.

References Base64Out< Output >::put().

template<class Output>
Base64Out<Output>& Base64Out< Output >::operator<< ( uint32  x  )  [inline]

Output 32 bit integer in little-endian order.

References Base64Out< Output >::put().

template<class Output>
Base64Out< Output > & Base64Out< Output >::operator<< ( const char *  x  )  [inline]

Output null-terminated string.

template<class Output>
Base64Out< Output > & Base64Out< Output >::operator<< ( const signed char *  x  )  [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::operator<< ( const unsigned char *  x  )  [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::operator<< ( const void *  x  )  [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::put ( unsigned char  x  )  [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::put ( signed char  x  )  [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::put ( int  x  )  [inline]

Output the low 8 bits of an integer.

References Base64Out< Output >::put().

template<class Output>
Base64Out< Output > & Base64Out< Output >::put ( char  x  )  [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::put ( uint32  x  )  [inline]

Output 32 bit integer in little-endian order.

template<class Output>
Base64Out< Output > & Base64Out< Output >::write ( const char *  x,
unsigned  n 
) [inline]

Output n characters.

Referenced by main(), MD5::toString(), and Base64Out< Output >::write().

template<class Output>
Base64Out< Output > & Base64Out< Output >::write ( const signed char *  x,
unsigned  n 
) [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::write ( const unsigned char *  x,
unsigned  n 
) [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::write ( const void *  x,
unsigned  n 
) [inline]

template<class Output>
Base64Out< Output > & Base64Out< Output >::flush (  )  [inline]

This is *not* a no-op.

Referenced by flush(), and main().

template<class Output>
Base64Out< Output > & Base64Out< Output >::trailer ( streamsize  n  )  [inline]

Output the appropriate number of '=' characters (0, 1 or 2) given how many bytes were fed into the Base64Out<Output> object.


Member Data Documentation

template<class Output>
bool Base64Out< Output >::hex = false [inline, static]

A bit of a hack for jigdo: If true, switch from Base64 output to hexadecimal output.

Default is false.

Referenced by Base64Out< Output >::put().


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

Generated on Tue Sep 23 14:27:42 2008 for jigdo by  doxygen 1.5.6