Public Member Functions | Private Attributes | List of all members
GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream > Class Template Reference

A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence. More...

Public Member Functions

 PercentEncodeStream (OutputStream &os)
 
void Put (char c)
 

Private Attributes

OutputStream & os_
 

Detailed Description

template<typename ValueType, typename Allocator = CrtAllocator>
template<typename OutputStream>
class GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream >

A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence.

Definition at line 1028 of file pointer.h.

Constructor & Destructor Documentation

template<typename ValueType, typename Allocator = CrtAllocator>
template<typename OutputStream>
GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream >::PercentEncodeStream ( OutputStream &  os)
inline

Definition at line 1030 of file pointer.h.

1030 : os_(os) {}

Member Function Documentation

template<typename ValueType, typename Allocator = CrtAllocator>
template<typename OutputStream>
void GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream >::Put ( char  c)
inline

Definition at line 1031 of file pointer.h.

1031  { // UTF-8 must be byte
1032  unsigned char u = static_cast<unsigned char>(c);
1033  static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
1034  os_.Put('%');
1035  os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u >> 4]));
1036  os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u & 15]));
1037  }

Member Data Documentation

template<typename ValueType, typename Allocator = CrtAllocator>
template<typename OutputStream>
OutputStream& GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream >::os_
private

Definition at line 1039 of file pointer.h.


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