base64< _E, _Tr >::three2four Struct Reference

#include <base64.h>

List of all members.

Public Member Functions

void zero ()
byte_t get_0 () const
byte_t get_1 () const
byte_t get_2 () const
void set_0 (byte_t _ch)
void set_1 (byte_t _ch)
void set_2 (byte_t _ch)
int b64_0 () const
int b64_1 () const
int b64_2 () const
int b64_3 () const
void b64_0 (int _ch)
void b64_1 (int _ch)
void b64_2 (int _ch)
void b64_3 (int _ch)

Private Attributes

byte_t _data [3]


Detailed Description

template<class _E = char, class _Tr = std::char_traits<_E>>
struct base64< _E, _Tr >::three2four

Definition at line 87 of file base64.h.


Member Function Documentation

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::b64_0 ( int  _ch  )  [inline]

Definition at line 133 of file base64.h.

References _0000_0011, _0011_1111, and base64< _E, _Tr >::three2four::_data.

00133 {_data[0] = ((_ch & _0011_1111) << 2) | (_0000_0011 & _data[0]);}

template<class _E = char, class _Tr = std::char_traits<_E>>
int base64< _E, _Tr >::three2four::b64_0 (  )  const [inline]

Definition at line 128 of file base64.h.

References _1111_1100, and base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get(), and base64< _E, _Tr >::put().

00128 {return (_data[0] & _1111_1100) >> 2;}

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::b64_1 ( int  _ch  )  [inline]

Definition at line 135 of file base64.h.

References _0000_1111, _0011_0000, _1111_1100, and base64< _E, _Tr >::three2four::_data.

00135                             {
00136             _data[0] = ((_ch & _0011_0000) >> 4) | (_1111_1100 & _data[0]);
00137             _data[1] = ((_ch & _0000_1111) << 4) | (_0000_1111 & _data[1]); }

template<class _E = char, class _Tr = std::char_traits<_E>>
int base64< _E, _Tr >::three2four::b64_1 (  )  const [inline]

Definition at line 129 of file base64.h.

References _0000_0011, _1111_0000, and base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get(), and base64< _E, _Tr >::put().

00129 {return ((_data[0] & _0000_0011) << 4) + ((_data[1] & _1111_0000)>>4);}

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::b64_2 ( int  _ch  )  [inline]

Definition at line 139 of file base64.h.

References _0000_0011, _0011_1100, _0011_1111, _1111_0000, and base64< _E, _Tr >::three2four::_data.

00139                             {
00140             _data[1] = ((_ch & _0011_1100) >> 2) | (_1111_0000 & _data[1]);
00141             _data[2] = ((_ch & _0000_0011) << 6) | (_0011_1111 & _data[2]); }

template<class _E = char, class _Tr = std::char_traits<_E>>
int base64< _E, _Tr >::three2four::b64_2 (  )  const [inline]

Definition at line 130 of file base64.h.

References _0000_1111, _1100_0000, and base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get(), and base64< _E, _Tr >::put().

00130 {return ((_data[1] & _0000_1111) << 2) + ((_data[2] & _1100_0000)>>6);}

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::b64_3 ( int  _ch  )  [inline]

Definition at line 143 of file base64.h.

References _0011_1111, _1100_0000, and base64< _E, _Tr >::three2four::_data.

00143                            {
00144             _data[2] = (_ch & _0011_1111) | (_1100_0000 & _data[2]);}

template<class _E = char, class _Tr = std::char_traits<_E>>
int base64< _E, _Tr >::three2four::b64_3 (  )  const [inline]

Definition at line 131 of file base64.h.

References _0011_1111, and base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get(), and base64< _E, _Tr >::put().

00131 {return (_data[2] & _0011_1111);}

template<class _E = char, class _Tr = std::char_traits<_E>>
byte_t base64< _E, _Tr >::three2four::get_0 (  )  const [inline]

Definition at line 96 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get().

00097         {
00098             return _data[0];
00099         }

template<class _E = char, class _Tr = std::char_traits<_E>>
byte_t base64< _E, _Tr >::three2four::get_1 (  )  const [inline]

Definition at line 100 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get().

00101         {
00102             return _data[1];
00103         }

template<class _E = char, class _Tr = std::char_traits<_E>>
byte_t base64< _E, _Tr >::three2four::get_2 (  )  const [inline]

Definition at line 104 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get().

00105         {
00106             return _data[2];
00107         }

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::set_0 ( byte_t  _ch  )  [inline]

Definition at line 109 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::put().

00110         {
00111             _data[0] = _ch;
00112         }

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::set_1 ( byte_t  _ch  )  [inline]

Definition at line 114 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::put().

00115         {
00116             _data[1] = _ch;
00117         }

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::set_2 ( byte_t  _ch  )  [inline]

Definition at line 119 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::put().

00120         {
00121             _data[2] = _ch;
00122         }

template<class _E = char, class _Tr = std::char_traits<_E>>
void base64< _E, _Tr >::three2four::zero (  )  [inline]

Definition at line 89 of file base64.h.

References base64< _E, _Tr >::three2four::_data.

Referenced by base64< _E, _Tr >::get(), and base64< _E, _Tr >::put().

00090         {
00091             _data[0] = 0;
00092             _data[1] = 0;
00093             _data[2] = 0;
00094         }


Member Data Documentation

template<class _E = char, class _Tr = std::char_traits<_E>>
byte_t base64< _E, _Tr >::three2four::_data[3] [private]

Definition at line 147 of file base64.h.

Referenced by base64< _E, _Tr >::three2four::b64_0(), base64< _E, _Tr >::three2four::b64_1(), base64< _E, _Tr >::three2four::b64_2(), base64< _E, _Tr >::three2four::b64_3(), base64< _E, _Tr >::three2four::get_0(), base64< _E, _Tr >::three2four::get_1(), base64< _E, _Tr >::three2four::get_2(), base64< _E, _Tr >::three2four::set_0(), base64< _E, _Tr >::three2four::set_1(), base64< _E, _Tr >::three2four::set_2(), and base64< _E, _Tr >::three2four::zero().


The documentation for this struct was generated from the following file:
Generated on Mon Nov 23 08:03:56 2009 for MIPP(E907) by  doxygen 1.4.7