NGL  6.5
The NCCA Graphics Library
GenericPointer< ValueType, Allocator >::PercentDecodeStream Class Reference

A helper stream for decoding a percent-encoded sequence into code unit. More...

+ Collaboration diagram for GenericPointer< ValueType, Allocator >::PercentDecodeStream:

Public Member Functions

 PercentDecodeStream (const Ch *source, const Ch *end)
 Constructor. More...
 
Ch Take ()
 
size_t Tell () const
 
bool IsValid () const
 

Private Attributes

const Chsrc_
 Current read position. More...
 
const Chhead_
 Original head of the string. More...
 
const Chend_
 Past-the-end position. More...
 
bool valid_
 Whether the parsing is valid. More...
 

Detailed Description

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

A helper stream for decoding a percent-encoded sequence into code unit.

This stream decodes XY triplet into code unit (0-255). If it encounters invalid characters, it sets output code unit as 0 and mark invalid, and to be checked by IsValid().

Definition at line 945 of file pointer.h.

Constructor & Destructor Documentation

template<typename ValueType, typename Allocator = CrtAllocator>
GenericPointer< ValueType, Allocator >::PercentDecodeStream::PercentDecodeStream ( const Ch source,
const Ch end 
)
inline

Constructor.

Parameters
sourceStart of the stream
endPast-the-end of the stream.

Definition at line 952 of file pointer.h.

Member Function Documentation

template<typename ValueType, typename Allocator = CrtAllocator>
bool GenericPointer< ValueType, Allocator >::PercentDecodeStream::IsValid ( ) const
inline

Definition at line 977 of file pointer.h.

+ Here is the caller graph for this function:

template<typename ValueType, typename Allocator = CrtAllocator>
Ch GenericPointer< ValueType, Allocator >::PercentDecodeStream::Take ( )
inline

Definition at line 954 of file pointer.h.

template<typename ValueType, typename Allocator = CrtAllocator>
size_t GenericPointer< ValueType, Allocator >::PercentDecodeStream::Tell ( ) const
inline

Definition at line 976 of file pointer.h.

+ Here is the caller graph for this function:

Member Data Documentation

template<typename ValueType, typename Allocator = CrtAllocator>
const Ch* GenericPointer< ValueType, Allocator >::PercentDecodeStream::end_
private

Past-the-end position.

Definition at line 982 of file pointer.h.

template<typename ValueType, typename Allocator = CrtAllocator>
const Ch* GenericPointer< ValueType, Allocator >::PercentDecodeStream::head_
private

Original head of the string.

Definition at line 981 of file pointer.h.

template<typename ValueType, typename Allocator = CrtAllocator>
const Ch* GenericPointer< ValueType, Allocator >::PercentDecodeStream::src_
private

Current read position.

Definition at line 980 of file pointer.h.

template<typename ValueType, typename Allocator = CrtAllocator>
bool GenericPointer< ValueType, Allocator >::PercentDecodeStream::valid_
private

Whether the parsing is valid.

Definition at line 983 of file pointer.h.


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