Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
CursorGear< IT > Class Template Reference

#include "lib/iter-cursor.hpp"

Description

template<class IT>
class lib::iter::CursorGear< IT >

implementation for a "gear switching" iterator, based on STL container iterators.

Definition at line 49 of file iter-cursor.hpp.

Public Types

using pointer = meta::ValueTypeBinding< IT >::pointer
 
using reference = meta::ValueTypeBinding< IT >::reference
 
using value_type = std::remove_reference< reference >::type
 

Public Member Functions

 CursorGear ()
 
 CursorGear (IT &&begin, IT &&end)
 
void reverse (bool backwards)
 
void reverse ()
 
bool checkPoint () const
 
reference yield () const
 
void iterNext ()
 

Friends

bool operator== (CursorGear const &g1, CursorGear const &g2)
 

Private Attributes

bool backwards_ {false}
 
const IT start_
 
const IT end_
 
IT pos_
 

Constructor & Destructor Documentation

◆ CursorGear() [1/2]

template<class IT >
CursorGear ( )
inline

Definition at line 64 of file iter-cursor.hpp.

◆ CursorGear() [2/2]

template<class IT >
CursorGear ( IT &&  begin,
IT &&  end 
)
inline

Definition at line 70 of file iter-cursor.hpp.

Member Typedef Documentation

◆ pointer

template<class IT >
using pointer = meta::ValueTypeBinding<IT>::pointer

Definition at line 59 of file iter-cursor.hpp.

◆ reference

template<class IT >
using reference = meta::ValueTypeBinding<IT>::reference

Definition at line 60 of file iter-cursor.hpp.

◆ value_type

template<class IT >
using value_type = std::remove_reference<reference>::type
Note
will be const for const iterators (while const_iterator::value_type isn't)

Definition at line 61 of file iter-cursor.hpp.

Member Function Documentation

◆ reverse() [1/2]

template<class IT >
void reverse ( bool  backwards)
inline

Definition at line 80 of file iter-cursor.hpp.

References CursorGear< IT >::backwards_, and CursorGear< IT >::reverse().

+ Here is the call graph for this function:

◆ reverse() [2/2]

template<class IT >
void reverse ( )
inline

Definition at line 86 of file iter-cursor.hpp.

References CursorGear< IT >::backwards_, CursorGear< IT >::end_, CursorGear< IT >::pos_, and CursorGear< IT >::start_.

Referenced by CursorGear< IT >::reverse().

+ Here is the caller graph for this function:

◆ checkPoint()

template<class IT >
bool checkPoint ( ) const
inline

◆ yield()

template<class IT >
reference yield ( ) const
inline

Definition at line 111 of file iter-cursor.hpp.

References CursorGear< IT >::backwards_, and CursorGear< IT >::pos_.

◆ iterNext()

template<class IT >
void iterNext ( )
inline

Definition at line 118 of file iter-cursor.hpp.

References CursorGear< IT >::backwards_, and CursorGear< IT >::pos_.

Member Data Documentation

◆ backwards_

template<class IT >
bool backwards_ {false}
private

◆ start_

template<class IT >
const IT start_
private

Definition at line 52 of file iter-cursor.hpp.

Referenced by CursorGear< IT >::checkPoint(), and CursorGear< IT >::reverse().

◆ end_

template<class IT >
const IT end_
private

Definition at line 53 of file iter-cursor.hpp.

Referenced by CursorGear< IT >::checkPoint(), and CursorGear< IT >::reverse().

◆ pos_

template<class IT >
IT pos_
private

Friends And Related Symbol Documentation

◆ operator==

template<class IT >
bool operator== ( CursorGear< IT > const &  g1,
CursorGear< IT > const &  g2 
)
friend

Definition at line 128 of file iter-cursor.hpp.

+ Collaboration diagram for CursorGear< IT >:

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