Lumiera  0.pre.03
»edityourfreedom«
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 58 of file iter-cursor.hpp.

Public Types

typedef meta::TypeBinding< IT >::pointer pointer
 
typedef meta::TypeBinding< IT >::reference reference
 
typedef std::remove_reference< reference >::type value_type
 

Public Member Functions

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

Friends

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

Private Attributes

bool backwards_
 
const IT end_
 
IT pos_
 
const IT start_
 

Member Typedef Documentation

◆ pointer

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

◆ reference

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

◆ value_type

typedef std::remove_reference<reference>::type value_type
Note
will be const for const iterators

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

Constructor & Destructor Documentation

◆ CursorGear() [1/2]

CursorGear ( )
inline

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

◆ CursorGear() [2/2]

CursorGear ( IT &&  begin,
IT &&  end 
)
inline

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

Member Function Documentation

◆ reverse() [1/2]

void reverse ( bool  backwards)
inline

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

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

+ Here is the call graph for this function:

◆ reverse() [2/2]

void reverse ( )
inline

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

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

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

+ Here is the caller graph for this function:

◆ checkPoint()

bool checkPoint ( ) const
inline

◆ yield()

reference yield ( ) const
inline

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

References CursorGear< IT >::backwards_.

◆ iterNext()

void iterNext ( )
inline

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

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

Member Data Documentation

◆ backwards_

◆ start_

const IT start_
private

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

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

◆ end_

const IT end_
private

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

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

◆ pos_

IT pos_
private

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

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

Friends And Related Function Documentation

◆ operator==

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

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

+ Collaboration diagram for CursorGear< IT >:

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