Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::AutoStack< ValueType >::ConstIterator Class Reference

An iterator that visits the values of a const AutoStack from the top to the bottom. More...

#include <bond/stl/autostack.h>

Public Member Functions

 ConstIterator () noexcept
 Constructs a ConstIterator that does not refer to any value.
 ConstIterator (const Iterator &iterator) noexcept
 Constructs a ConstIterator that refers to the same value as the given Iterator.
const ValueType & operator* () const
 Returns a const reference to the value to which the ConstIterator refers.
const ValueType * operator-> () const
 Returns a const pointer to the value to which the ConstIterator refers.
ConstIterator & operator++ ()
 Advances the ConstIterator to the next value down the stack.
ConstIterator operator++ (int)
 Advances the ConstIterator to the next value down the stack.

Friends

class AutoStack
bool operator== (const ConstIterator &a, const ConstIterator &b) noexcept
 Returns whether two ConstIterators refer to the same value.
bool operator!= (const ConstIterator &a, const ConstIterator &b) noexcept
 Returns whether two ConstIterators refer to different values.

Detailed Description

template<typename ValueType>
class Bond::AutoStack< ValueType >::ConstIterator

An iterator that visits the values of a const AutoStack from the top to the bottom.

Constructor & Destructor Documentation

◆ ConstIterator() [1/2]

template<typename ValueType>
Bond::AutoStack< ValueType >::ConstIterator::ConstIterator ( )
inlinenoexcept

Constructs a ConstIterator that does not refer to any value.

◆ ConstIterator() [2/2]

template<typename ValueType>
Bond::AutoStack< ValueType >::ConstIterator::ConstIterator ( const Iterator & iterator)
inlinenoexcept

Constructs a ConstIterator that refers to the same value as the given Iterator.

Parameters
iteratorThe Iterator from which the ConstIterator is constructed.

Member Function Documentation

◆ operator*()

template<typename ValueType>
const ValueType & Bond::AutoStack< ValueType >::ConstIterator::operator* ( ) const
inline

Returns a const reference to the value to which the ConstIterator refers.

◆ operator++() [1/2]

template<typename ValueType>
ConstIterator & Bond::AutoStack< ValueType >::ConstIterator::operator++ ( )
inline

Advances the ConstIterator to the next value down the stack.

Returns
A reference to this ConstIterator.

◆ operator++() [2/2]

template<typename ValueType>
ConstIterator Bond::AutoStack< ValueType >::ConstIterator::operator++ ( int )
inline

Advances the ConstIterator to the next value down the stack.

Returns
A copy of the ConstIterator from before it was advanced.

◆ operator->()

template<typename ValueType>
const ValueType * Bond::AutoStack< ValueType >::ConstIterator::operator-> ( ) const
inline

Returns a const pointer to the value to which the ConstIterator refers.

◆ AutoStack

template<typename ValueType>
friend class AutoStack
friend

◆ operator!=

template<typename ValueType>
bool operator!= ( const ConstIterator & a,
const ConstIterator & b )
friend

Returns whether two ConstIterators refer to different values.

◆ operator==

template<typename ValueType>
bool operator== ( const ConstIterator & a,
const ConstIterator & b )
friend

Returns whether two ConstIterators refer to the same value.


The documentation for this class was generated from the following file:
  • include/bond/stl/autostack.h