libhatchet
Loading...
Searching...
No Matches
hxlist< T, deleter_t_ >::const_iterator Class Reference

#include <hxlist.hpp>

Public Member Functions

 const_iterator (void)
const_iteratoroperator++ (void)
const_iterator operator++ (int)
const_iteratoroperator-- (void)
const_iterator operator-- (int)
bool operator== (const const_iterator &x_) const
const Toperator* (void) const
const Toperator-> (void) const

Detailed Description

template<typename T, typename deleter_t_ = hxdefault_delete>
class hxlist< T, deleter_t_ >::const_iterator

const_iterator - Bidirectional iterator over const nodes.

Constructor & Destructor Documentation

◆ const_iterator()

template<typename T, typename deleter_t_ = hxdefault_delete>
hxlist< T, deleter_t_ >::const_iterator::const_iterator ( void )
inline

Constructs an iterator that must not be incremented or dereferenced.

Member Function Documentation

◆ operator*()

template<typename T, typename deleter_t_ = hxdefault_delete>
const T & hxlist< T, deleter_t_ >::const_iterator::operator* ( void ) const
inline

Returns a const reference to the current node.

◆ operator++() [1/2]

template<typename T, typename deleter_t_ = hxdefault_delete>
const_iterator hxlist< T, deleter_t_ >::const_iterator::operator++ ( int )

Post-increment: advances to the next node and returns the prior position.

◆ operator++() [2/2]

template<typename T, typename deleter_t_ = hxdefault_delete>
const_iterator & hxlist< T, deleter_t_ >::const_iterator::operator++ ( void )

Advances to the next node and returns this iterator.

◆ operator--() [1/2]

template<typename T, typename deleter_t_ = hxdefault_delete>
const_iterator hxlist< T, deleter_t_ >::const_iterator::operator-- ( int )

Post-decrement: retreats to the previous node and returns the prior position.

◆ operator--() [2/2]

template<typename T, typename deleter_t_ = hxdefault_delete>
const_iterator & hxlist< T, deleter_t_ >::const_iterator::operator-- ( void )

Retreats to the previous node and returns this iterator.

◆ operator->()

template<typename T, typename deleter_t_ = hxdefault_delete>
const T * hxlist< T, deleter_t_ >::const_iterator::operator-> ( void ) const
inline

Returns a const pointer to the current node.

◆ operator==()

template<typename T, typename deleter_t_ = hxdefault_delete>
bool hxlist< T, deleter_t_ >::const_iterator::operator== ( const const_iterator & x_) const

Returns true if both iterators point to the same node.

  • x : The iterator to compare against.

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