Jpp
Public Member Functions | List of all members
JLANG::JForwardIterator< T > Class Template Referenceabstract

Template interface for method bool increment(). More...

#include <JForwardIterator.hh>

Inheritance diagram for JLANG::JForwardIterator< T >:
JLANG::JBidirectionalIterator< T >

Public Member Functions

virtual ~JForwardIterator ()
 Virtual destructor. More...
 
T & operator++ ()
 Increment iterator. More...
 
operator++ (int)
 Increment iterator. More...
 
virtual bool increment ()=0
 Increment iterator. More...
 

Detailed Description

template<class T>
class JLANG::JForwardIterator< T >

Template interface for method bool increment().

This interface implements the pre-fix and post-fix operators ++.

Definition at line 18 of file JForwardIterator.hh.

Constructor & Destructor Documentation

◆ ~JForwardIterator()

template<class T>
virtual JLANG::JForwardIterator< T >::~JForwardIterator ( )
inlinevirtual

Virtual destructor.

Definition at line 23 of file JForwardIterator.hh.

24  {}

Member Function Documentation

◆ operator++() [1/2]

template<class T>
T& JLANG::JForwardIterator< T >::operator++ ( )
inline

Increment iterator.

Returns
this iterator

Definition at line 32 of file JForwardIterator.hh.

33  {
34  this->increment();
35 
36  return static_cast<T&>(*this);
37  }

◆ operator++() [2/2]

template<class T>
T JLANG::JForwardIterator< T >::operator++ ( int  )
inline

Increment iterator.

Returns
previous iterator

Definition at line 45 of file JForwardIterator.hh.

46  {
47  const T tmp(static_cast<const T&>(*this));
48 
49  this->increment();
50 
51  return tmp;
52  }

◆ increment()

template<class T>
virtual bool JLANG::JForwardIterator< T >::increment ( )
pure virtual

The documentation for this class was generated from the following file:
JLANG::JForwardIterator::increment
virtual bool increment()=0
Increment iterator.