AlgoPlus v0.1.0
Loading...
Searching...
No Matches
doubly_linked_list< T >::Iterator Class Reference

Iterator class. More...

#include <doubly_linked_list.h>

Public Member Functions

 Iterator (const std::shared_ptr< node > &l) noexcept
 Construct a new Iterator object.
 
Iteratoroperator= (std::shared_ptr< node > current)
 = operator for Iterator type
 
Iteratoroperator++ ()
 operator ++ for type Iterator
 
Iterator operator++ (int)
 operator ++ for type Iterator
 
Iteratoroperator-- ()
 operator – for type Iterator
 
Iterator operator-- (int)
 operator – for type iterator
 
bool operator!= (const Iterator &it)
 operator != for type Iterator
 
operator* ()
 operator * for type Iterator
 

Detailed Description

template<typename T>
class doubly_linked_list< T >::Iterator

Iterator class.

Constructor & Destructor Documentation

◆ Iterator()

template<typename T >
doubly_linked_list< T >::Iterator::Iterator ( const std::shared_ptr< node > & l)
inlineexplicitnoexcept

Construct a new Iterator object.

Parameters
ldoubly linked list type

Member Function Documentation

◆ operator!=()

template<typename T >
bool doubly_linked_list< T >::Iterator::operator!= ( const Iterator & it)
inline

operator != for type Iterator

Parameters
itconst Iterator
Returns
true if curr_root == it.curr_root
false otherwise

◆ operator*()

template<typename T >
T doubly_linked_list< T >::Iterator::operator* ( )
inline

operator * for type Iterator

Returns
T the value of the node

◆ operator++() [1/2]

template<typename T >
Iterator & doubly_linked_list< T >::Iterator::operator++ ( )
inline

operator ++ for type Iterator

Returns
Iterator&

◆ operator++() [2/2]

template<typename T >
Iterator doubly_linked_list< T >::Iterator::operator++ ( int )
inline

operator ++ for type Iterator

Returns
Iterator

◆ operator--() [1/2]

template<typename T >
Iterator & doubly_linked_list< T >::Iterator::operator-- ( )
inline

operator – for type Iterator

Returns
Iterator&

◆ operator--() [2/2]

template<typename T >
Iterator doubly_linked_list< T >::Iterator::operator-- ( int )
inline

operator – for type iterator

Returns
Iterator

◆ operator=()

template<typename T >
Iterator & doubly_linked_list< T >::Iterator::operator= ( std::shared_ptr< node > current)
inline

= operator for Iterator type

Parameters
currentsmart pointer of type node
Returns
Iterator&

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