u5e
UnicodeTextC++Library
Public Types | Public Member Functions | List of all members
u5e::basic_grapheme_iterator< UnderlyingEncodedStringView > Class Template Reference

Iterator that describes full graphemes. More...

#include <u5e/basic_grapheme_iterator.hpp>

Public Types

typedef UnderlyingEncodedStringView::const_iterator const_codepoint_iterator
 
typedef basic_grapheme< UnderlyingEncodedStringView > grapheme
 
typedef grapheme value_type
 
typedef props::grapheme_cluster_break::prop_value_type g_c_b_vt
 

Public Member Functions

bool is_grapheme_boundary (codepoint a, codepoint b)
 
 basic_grapheme_iterator (const_codepoint_iterator b, const_codepoint_iterator e)
 start at the beginning of the text
 
 basic_grapheme_iterator (const_codepoint_iterator b, const_codepoint_iterator e, const_codepoint_iterator w)
 start at a specific point find the start and the end of the grapheme
 
 basic_grapheme_iterator (const_codepoint_iterator b, const_codepoint_iterator e, const_codepoint_iterator w, const_codepoint_iterator we)
 start at a specific point - precalculated start and end of grapheme
 
 basic_grapheme_iterator (const basic_grapheme_iterator &copy)
 copy constructor
 
grapheme operator* ()
 
bool operator== (const_codepoint_iterator other)
 
bool operator== (basic_grapheme_iterator other)
 
bool operator!= (basic_grapheme_iterator other)
 
bool operator!= (const_codepoint_iterator other)
 
void find_end_of_grapheme ()
 
void find_start_of_grapheme ()
 
basic_grapheme_iterator operator++ ()
 
basic_grapheme_iterator operator++ (int i)
 

Public Attributes

const_codepoint_iterator begin_
 
const_codepoint_iterator end_
 
const_codepoint_iterator where_
 
const_codepoint_iterator end_of_grapheme_
 

Detailed Description

template<typename UnderlyingEncodedStringView>
class u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >

Iterator that describes full graphemes.

Template Parameters
UnderlyingEncodedStringViewthe underlying encoded string type with an underlying native string-like type.

Definition at line 11 of file basic_encodedstring.hpp.

Member Typedef Documentation

template<typename UnderlyingEncodedStringView >
typedef UnderlyingEncodedStringView::const_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::const_codepoint_iterator

The type of the underlying encoded iterator

Definition at line 22 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
typedef basic_grapheme<UnderlyingEncodedStringView> u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::grapheme

the specific grapheme type for this encoded string view

Definition at line 27 of file basic_grapheme_iterator.hpp.

Member Function Documentation

template<typename UnderlyingEncodedStringView >
void u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::find_end_of_grapheme ( )
inline

Use the data from the unicode database to find the start and end of the current grapheme.

Definition at line 131 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
void u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::find_start_of_grapheme ( )
inline

Use the data from the unicode database to find the start and end of the current grapheme.

Definition at line 157 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
bool u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::is_grapheme_boundary ( codepoint  a,
codepoint  b 
)
inline

The unicode standard documents that a grapheme boundary can be determined by looking just at two adjecent codepoints.

Definition at line 53 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
bool u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator!= ( basic_grapheme_iterator< UnderlyingEncodedStringView >  other)
inline

delegate the comparison to the underlying iterator

Definition at line 285 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
bool u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator!= ( const_codepoint_iterator  other)
inline

delegate the comparison to the underlying iterator

Definition at line 292 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
grapheme u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator* ( )
inline

dereference to a grapheme object

Definition at line 226 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
basic_grapheme_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator++ ( )
inline

advance one grapheme

Definition at line 234 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
basic_grapheme_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator++ ( int  i)
inline

advance one grapheme

Definition at line 240 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
bool u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator== ( const_codepoint_iterator  other)
inline

delegate the comparison to the underlying iterator

Definition at line 250 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
bool u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::operator== ( basic_grapheme_iterator< UnderlyingEncodedStringView >  other)
inline

delegate the comparison to the underlying iterator

Definition at line 267 of file basic_grapheme_iterator.hpp.

Member Data Documentation

template<typename UnderlyingEncodedStringView >
const_codepoint_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::begin_

The begin and end iterators for the whole text are necessary for bounds check, since the size of graphemes cannot be predicted.

Definition at line 35 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
const_codepoint_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::end_

The begin and end iterators for the whole text are necessary for bounds check, since the size of graphemes cannot be predicted.

Definition at line 36 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
const_codepoint_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::end_of_grapheme_

This par of iterators point to where we are now and where the end of the current grapheme is.

Definition at line 44 of file basic_grapheme_iterator.hpp.

template<typename UnderlyingEncodedStringView >
const_codepoint_iterator u5e::basic_grapheme_iterator< UnderlyingEncodedStringView >::where_

This par of iterators point to where we are now and where the end of the current grapheme is.

Definition at line 43 of file basic_grapheme_iterator.hpp.


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