u5e
UnicodeTextC++Library
Public Member Functions | Public Attributes | List of all members
u5e::utf8_iterator_base< NativeIterator > Class Template Reference

Defines the basic inner workings of utf8 iterator. More...

#include <u5e/utf8_iterator.hpp>

Inheritance diagram for u5e::utf8_iterator_base< NativeIterator >:
Inheritance graph
[legend]
Collaboration diagram for u5e::utf8_iterator_base< NativeIterator >:
Collaboration graph
[legend]

Public Types

typedef codepoint value_type
 
typedef const codepointreference
 
typedef int difference_type
 
typedef std::bidirectional_iterator_tag iterator_category
 

Public Member Functions

 utf8_iterator_base (const NativeIterator raw_iterator)
 
bool rewind_to_start_of_codepoint (const char current_octet)
 
void forward_one_codepoint ()
 
void rewind_one_codepoint ()
 
const codepoint current_codepoint ()
 

Public Attributes

iterator_assertion< NativeIterator, char > _assertions
 
NativeIterator raw_iterator_
 

Detailed Description

template<typename NativeIterator>
class u5e::utf8_iterator_base< NativeIterator >

Defines the basic inner workings of utf8 iterator.

Template Parameters
NativeIteratorThe underlying type to be iterated over.

Definition at line 17 of file utf8_iterator.hpp.

Member Typedef Documentation

template<typename NativeIterator >
typedef int u5e::utf8_iterator_base< NativeIterator >::difference_type

Basic iterator typedefs

Definition at line 34 of file utf8_iterator.hpp.

template<typename NativeIterator >
typedef std::bidirectional_iterator_tag u5e::utf8_iterator_base< NativeIterator >::iterator_category

Basic iterator typedefs

Definition at line 35 of file utf8_iterator.hpp.

template<typename NativeIterator >
typedef const codepoint& u5e::utf8_iterator_base< NativeIterator >::reference

Basic iterator typedefs

Definition at line 33 of file utf8_iterator.hpp.

template<typename NativeIterator >
typedef codepoint u5e::utf8_iterator_base< NativeIterator >::value_type

Basic iterator typedefs

Definition at line 32 of file utf8_iterator.hpp.

Constructor & Destructor Documentation

template<typename NativeIterator >
u5e::utf8_iterator_base< NativeIterator >::utf8_iterator_base ( const NativeIterator  raw_iterator)
inline

Create a iterator from the underlying iterator

Definition at line 41 of file utf8_iterator.hpp.

Member Function Documentation

template<typename NativeIterator >
const codepoint u5e::utf8_iterator_base< NativeIterator >::current_codepoint ( )
inline

Return the codepoint that starts where we are now

Definition at line 83 of file utf8_iterator.hpp.

template<typename NativeIterator >
void u5e::utf8_iterator_base< NativeIterator >::forward_one_codepoint ( )
inline

Advance the iterator to the next codepoint

Definition at line 63 of file utf8_iterator.hpp.

template<typename NativeIterator >
void u5e::utf8_iterator_base< NativeIterator >::rewind_one_codepoint ( )
inline

Go to the previous codepoint.

Definition at line 72 of file utf8_iterator.hpp.

template<typename NativeIterator >
bool u5e::utf8_iterator_base< NativeIterator >::rewind_to_start_of_codepoint ( const char  current_octet)
inline

When doing a reverse itetor, you need to be able to find where the current codepoint started.

Definition at line 49 of file utf8_iterator.hpp.

Member Data Documentation

template<typename NativeIterator >
iterator_assertion<NativeIterator, char> u5e::utf8_iterator_base< NativeIterator >::_assertions

The NativeIterator must match the attributes of char

Definition at line 22 of file utf8_iterator.hpp.

template<typename NativeIterator >
NativeIterator u5e::utf8_iterator_base< NativeIterator >::raw_iterator_

This class composes over the NativeIterator

Definition at line 26 of file utf8_iterator.hpp.


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