Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream > Class Template Reference

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

#include <pointer.h>

Public Member Functions

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

Detailed Description

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

Definition at line 1085 of file pointer.h.

Constructor & Destructor Documentation

◆ PercentEncodeStream()

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

Definition at line 1087 of file pointer.h.

1087: os_(os) {}
os_t os

Member Function Documentation

◆ Put()

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

Definition at line 1088 of file pointer.h.

1088 { // UTF-8 must be byte
1089 unsigned char u = static_cast<unsigned char>(c);
1090 static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
1091 os_.Put('%');
1092 os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u >> 4]));
1093 os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u & 15]));
1094 }

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