mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
mmcfilters::MorphologicalTree::BreadthFirstNodeIterator Class Reference

Breadth-first iterator over one subtree. More...

#include <MorphologicalTree.hpp>

Public Types

using iterator_category = std::input_iterator_tag
 Standard iterator category exposed for STL compatibility.
 
using value_type = NodeId
 Node id yielded by the iterator.
 
using difference_type = std::ptrdiff_t
 Signed distance type exposed for STL compatibility.
 
using pointer = const NodeId *
 Pointer type exposed for STL compatibility.
 
using reference = const NodeId &
 Reference type exposed for STL compatibility.
 

Public Member Functions

 BreadthFirstNodeIterator ()=default
 Creates the end/sentinel breadth-first iterator.
 
 BreadthFirstNodeIterator (const MorphologicalTree *tree, NodeId rootNodeId, std::size_t expectedVersion)
 Creates a breadth-first iterator rooted at rootNodeId.
 
BreadthFirstNodeIteratoroperator++ ()
 Advances to the next node in breadth-first order.
 
NodeId operator* () const
 Returns the current breadth-first node id.
 
bool operator== (const BreadthFirstNodeIterator &other) const
 Compares breadth-first iterator exhaustion state.
 
bool operator!= (const BreadthFirstNodeIterator &other) const
 Compares breadth-first iterator exhaustion state for inequality.
 

Detailed Description

Breadth-first iterator over one subtree.

Definition at line 3793 of file MorphologicalTree.hpp.

Member Typedef Documentation

◆ difference_type

Signed distance type exposed for STL compatibility.

Definition at line 3808 of file MorphologicalTree.hpp.

◆ iterator_category

Standard iterator category exposed for STL compatibility.

Definition at line 3804 of file MorphologicalTree.hpp.

◆ pointer

Pointer type exposed for STL compatibility.

Definition at line 3810 of file MorphologicalTree.hpp.

◆ reference

Reference type exposed for STL compatibility.

Definition at line 3812 of file MorphologicalTree.hpp.

◆ value_type

Node id yielded by the iterator.

Definition at line 3806 of file MorphologicalTree.hpp.

Constructor & Destructor Documentation

◆ BreadthFirstNodeIterator()

mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::BreadthFirstNodeIterator ( const MorphologicalTree tree,
NodeId  rootNodeId,
std::size_t  expectedVersion 
)
inline

Creates a breadth-first iterator rooted at rootNodeId.

Parameters
treeTree topology.
rootNodeIdIdentifier of the traversal root.
expectedVersionMutation version required by the operation.

Definition at line 3826 of file MorphologicalTree.hpp.

Member Function Documentation

◆ operator!=()

bool mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator!= ( const BreadthFirstNodeIterator other) const
inline

Compares breadth-first iterator exhaustion state for inequality.

Parameters
otherObject to compare with or transfer from.
Returns
True when the documented condition holds; otherwise false.

Definition at line 3872 of file MorphologicalTree.hpp.

◆ operator*()

NodeId mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator* ( ) const
inline

Returns the current breadth-first node id.

Returns
The current breadth-first node id.

Definition at line 3853 of file MorphologicalTree.hpp.

◆ operator++()

BreadthFirstNodeIterator & mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator++ ( )
inline

Advances to the next node in breadth-first order.

Returns
Mutable reference to the updated object.

Definition at line 3837 of file MorphologicalTree.hpp.

◆ operator==()

bool mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator== ( const BreadthFirstNodeIterator other) const
inline

Compares breadth-first iterator exhaustion state.

Parameters
otherObject to compare with or transfer from.
Returns
True when the documented condition holds; otherwise false.

Definition at line 3864 of file MorphologicalTree.hpp.


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