tinyutf8 4.0.2
Unicode (UTF-8) capable std::string
Loading...
Searching...
No Matches
tiny_utf8::iterator< Container, Raw > Struct Template Reference

#include <tinyutf8.h>

Inheritance diagram for tiny_utf8::iterator< Container, Raw >:
Collaboration diagram for tiny_utf8::iterator< Container, Raw >:

Public Member Functions

 iterator (typename iterator_base< Container, Raw >::difference_type index, Container *instance) noexcept
 Ctor.
 
 iterator (const iterator< Container, !Raw > &other) noexcept
 
 iterator () noexcept=default
 Default Functions.
 
 iterator (const iterator &) noexcept=default
 
iteratoroperator= (const iterator &) noexcept=default
 
 iterator (const const_iterator< Container, Raw > &)=delete
 Delete ctor from const iterator types.
 
 iterator (const const_reverse_iterator< Container, Raw > &)=delete
 
iteratoroperator++ () noexcept
 Increase the Iterator by one.
 
iterator operator++ (int) noexcept
 
iteratoroperator-- () noexcept
 Decrease the iterator by one.
 
iterator operator-- (int) noexcept
 
iterator operator+ (typename iterator_base< Container, Raw >::difference_type n) const noexcept
 Increase the Iterator n times.
 
iteratoroperator+= (typename iterator_base< Container, Raw >::difference_type n) noexcept
 
iterator operator- (typename iterator_base< Container, Raw >::difference_type n) const noexcept
 Decrease the Iterator n times.
 
iteratoroperator-= (typename iterator_base< Container, Raw >::difference_type n) noexcept
 
iterator::reference operator* () const noexcept
 Returns the value of the codepoint behind the iterator.
 
- Public Member Functions inherited from tiny_utf8::iterator_base< Container, false >
bool operator== (const iterator_base &it) const noexcept
 
bool operator!= (const iterator_base &it) const noexcept
 
 iterator_base (difference_type index, Container *instance) noexcept
 Ctor.
 
 iterator_base () noexcept=default
 Default function.
 
 iterator_base (const iterator_base &) noexcept=default
 
iterator_baseoperator= (const iterator_base &) noexcept=default
 
Container * get_instance () const noexcept
 Getter for the instance.
 
difference_type get_index () const noexcept
 
difference_type get_raw_index () const noexcept
 Get the index of the codepoint the iterator points to.
 
reference get_reference () const noexcept
 Get a reference to the codepoint the iterator points to.
 
value_type get_value () const noexcept
 Get the value that the iterator points to.
 

Additional Inherited Members

- Public Types inherited from tiny_utf8::iterator_base< Container, false >
typedef Container::value_type value_type
 
typedef Container::difference_type difference_type
 
typedef codepoint_reference< Container, false > reference
 
typedef void * pointer
 
typedef std::random_access_iterator_tag iterator_category
 
- Protected Member Functions inherited from tiny_utf8::iterator_base< Container, false >
void advance (difference_type n) noexcept
 Advance the iterator n times (negative values allowed!)
 
void increment () noexcept
 Move the iterator one codepoint ahead.
 
void decrement () noexcept
 Move the iterator one codepoint backwards.
 
- Protected Attributes inherited from tiny_utf8::iterator_base< Container, false >
difference_type t_index
 
Container * t_instance
 

Constructor & Destructor Documentation

◆ iterator() [1/6]

template<typename Container , bool Raw = false>
tiny_utf8::iterator< Container, Raw >::iterator ( typename iterator_base< Container, Raw >::difference_type index,
Container * instance )
inlinenoexcept

Ctor.

◆ iterator() [2/6]

template<typename Container , bool Raw = false>
tiny_utf8::iterator< Container, Raw >::iterator ( const iterator< Container, !Raw > & other)
inlinenoexcept

◆ iterator() [3/6]

template<typename Container , bool Raw = false>
tiny_utf8::iterator< Container, Raw >::iterator ( )
defaultnoexcept

Default Functions.

◆ iterator() [4/6]

template<typename Container , bool Raw = false>
tiny_utf8::iterator< Container, Raw >::iterator ( const iterator< Container, Raw > & )
defaultnoexcept

◆ iterator() [5/6]

template<typename Container , bool Raw = false>
tiny_utf8::iterator< Container, Raw >::iterator ( const const_iterator< Container, Raw > & )
delete

Delete ctor from const iterator types.

◆ iterator() [6/6]

template<typename Container , bool Raw = false>
tiny_utf8::iterator< Container, Raw >::iterator ( const const_reverse_iterator< Container, Raw > & )
delete

Member Function Documentation

◆ operator*()

template<typename Container , bool Raw = false>
iterator::reference tiny_utf8::iterator< Container, Raw >::operator* ( ) const
inlinenoexcept

Returns the value of the codepoint behind the iterator.

◆ operator+()

template<typename Container , bool Raw = false>
iterator tiny_utf8::iterator< Container, Raw >::operator+ ( typename iterator_base< Container, Raw >::difference_type n) const
inlinenoexcept

Increase the Iterator n times.

◆ operator++() [1/2]

template<typename Container , bool Raw = false>
iterator & tiny_utf8::iterator< Container, Raw >::operator++ ( )
inlinenoexcept

Increase the Iterator by one.

◆ operator++() [2/2]

template<typename Container , bool Raw = false>
iterator tiny_utf8::iterator< Container, Raw >::operator++ ( int )
inlinenoexcept

◆ operator+=()

template<typename Container , bool Raw = false>
iterator & tiny_utf8::iterator< Container, Raw >::operator+= ( typename iterator_base< Container, Raw >::difference_type n)
inlinenoexcept

◆ operator-()

template<typename Container , bool Raw = false>
iterator tiny_utf8::iterator< Container, Raw >::operator- ( typename iterator_base< Container, Raw >::difference_type n) const
inlinenoexcept

Decrease the Iterator n times.

◆ operator--() [1/2]

template<typename Container , bool Raw = false>
iterator & tiny_utf8::iterator< Container, Raw >::operator-- ( )
inlinenoexcept

Decrease the iterator by one.

◆ operator--() [2/2]

template<typename Container , bool Raw = false>
iterator tiny_utf8::iterator< Container, Raw >::operator-- ( int )
inlinenoexcept

◆ operator-=()

template<typename Container , bool Raw = false>
iterator & tiny_utf8::iterator< Container, Raw >::operator-= ( typename iterator_base< Container, Raw >::difference_type n)
inlinenoexcept

◆ operator=()

template<typename Container , bool Raw = false>
iterator & tiny_utf8::iterator< Container, Raw >::operator= ( const iterator< Container, Raw > & )
defaultnoexcept

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