IN2OSM  1.0.1
GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream >

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

#include <pointer.h>

Collaboration diagram for GenericPointer< ValueType, Allocator >::PercentEncodeStream< OutputStream >:
Collaboration graph

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 1085 of file pointer.h.

Constructor & Destructor Documentation

◆ PercentEncodeStream()

PercentEncodeStream ( OutputStream &  os)
inline

Definition at line 1087 of file pointer.h.

1087 : os_(os) {}

Member Function Documentation

◆ Put()

void 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  }

Member Data Documentation

◆ os_

OutputStream& os_
private

Definition at line 1096 of file pointer.h.


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