Public Member Functions | Private Member Functions | Private Attributes | List of all members
internal::DecodedStream< SourceStream, Encoding > Class Template Reference

#include <regex.h>

Public Member Functions

 DecodedStream (SourceStream &ss)
 
unsigned Peek ()
 
unsigned Take ()
 

Private Member Functions

void Decode ()
 

Private Attributes

SourceStream & ss_
 
unsigned codepoint_
 

Detailed Description

template<typename SourceStream, typename Encoding>
class internal::DecodedStream< SourceStream, Encoding >

Definition at line 51 of file regex.h.

Constructor & Destructor Documentation

template<typename SourceStream, typename Encoding>
internal::DecodedStream< SourceStream, Encoding >::DecodedStream ( SourceStream &  ss)
inline

Definition at line 53 of file regex.h.

53 : ss_(ss), codepoint_() { Decode(); }
unsigned codepoint_
Definition: regex.h:69
SourceStream & ss_
Definition: regex.h:68

Member Function Documentation

template<typename SourceStream, typename Encoding>
void internal::DecodedStream< SourceStream, Encoding >::Decode ( )
inlineprivate

Definition at line 63 of file regex.h.

63  {
64  if (!Encoding::Decode(ss_, &codepoint_))
65  codepoint_ = 0;
66  }
unsigned codepoint_
Definition: regex.h:69
SourceStream & ss_
Definition: regex.h:68
template<typename SourceStream, typename Encoding>
unsigned internal::DecodedStream< SourceStream, Encoding >::Peek ( )
inline

Definition at line 54 of file regex.h.

54 { return codepoint_; }
unsigned codepoint_
Definition: regex.h:69
template<typename SourceStream, typename Encoding>
unsigned internal::DecodedStream< SourceStream, Encoding >::Take ( )
inline

Definition at line 55 of file regex.h.

55  {
56  unsigned c = codepoint_;
57  if (c) // No further decoding when '\0'
58  Decode();
59  return c;
60  }
unsigned codepoint_
Definition: regex.h:69

Member Data Documentation

template<typename SourceStream, typename Encoding>
unsigned internal::DecodedStream< SourceStream, Encoding >::codepoint_
private

Definition at line 69 of file regex.h.

template<typename SourceStream, typename Encoding>
SourceStream& internal::DecodedStream< SourceStream, Encoding >::ss_
private

Definition at line 68 of file regex.h.


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