BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
base64< _E, _Tr >::three2four Struct Reference

#include <base64.h>

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)

Detailed Description

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

Definition at line 78 of file base64.h.

Member Function Documentation

◆ b64_0() [1/2]

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

Definition at line 99 of file base64.h.

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

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

◆ b64_0() [2/2]

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

Definition at line 108 of file base64.h.

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

◆ b64_1() [1/2]

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

Definition at line 100 of file base64.h.

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

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

◆ b64_1() [2/2]

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

Definition at line 112 of file base64.h.

112 {
113 _data[0] = ( ( _ch & _0011_0000 ) >> 4 ) | ( _1111_1100 & _data[0] );
114 _data[1] = ( ( _ch & _0000_1111 ) << 4 ) | ( _0000_1111 & _data[1] );
115 }

◆ b64_2() [1/2]

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

Definition at line 103 of file base64.h.

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

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

◆ b64_2() [2/2]

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

Definition at line 117 of file base64.h.

117 {
118 _data[1] = ( ( _ch & _0011_1100 ) >> 2 ) | ( _1111_0000 & _data[1] );
119 _data[2] = ( ( _ch & _0000_0011 ) << 6 ) | ( _0011_1111 & _data[2] );
120 }

◆ b64_3() [1/2]

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

Definition at line 106 of file base64.h.

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

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

◆ b64_3() [2/2]

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

Definition at line 122 of file base64.h.

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

◆ get_0()

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

Definition at line 85 of file base64.h.

85{ return _data[0]; }

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

◆ get_1()

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

Definition at line 86 of file base64.h.

86{ return _data[1]; }

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

◆ get_2()

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

Definition at line 87 of file base64.h.

87{ return _data[2]; }

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

◆ set_0()

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

Definition at line 89 of file base64.h.

89{ _data[0] = _ch; }

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

◆ set_1()

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

Definition at line 91 of file base64.h.

91{ _data[1] = _ch; }

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

◆ set_2()

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

Definition at line 93 of file base64.h.

93{ _data[2] = _ch; }

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

◆ zero()

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

Definition at line 79 of file base64.h.

79 {
80 _data[0] = 0;
81 _data[1] = 0;
82 _data[2] = 0;
83 }

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


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