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

Iterator over a materialised path between two nodes. 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

 PathBetweenNodesIterator ()=default
 Creates the end/sentinel path-between-nodes iterator.
 
 PathBetweenNodesIterator (const MorphologicalTree *tree, const std::vector< NodeId > *path, std::size_t index, std::size_t expectedVersion)
 Creates an iterator over a materialised node path.
 
PathBetweenNodesIteratoroperator++ ()
 Advances to the next node in the materialised path.
 
NodeId operator* () const
 Returns the current node id in the materialised path.
 
bool operator== (const PathBetweenNodesIterator &other) const
 Compares path iterator positions.
 
bool operator!= (const PathBetweenNodesIterator &other) const
 Compares path iterator positions for inequality.
 

Detailed Description

Iterator over a materialised path between two nodes.

Definition at line 4047 of file MorphologicalTree.hpp.

Member Typedef Documentation

◆ difference_type

Signed distance type exposed for STL compatibility.

Definition at line 4064 of file MorphologicalTree.hpp.

◆ iterator_category

Standard iterator category exposed for STL compatibility.

Definition at line 4060 of file MorphologicalTree.hpp.

◆ pointer

Pointer type exposed for STL compatibility.

Definition at line 4066 of file MorphologicalTree.hpp.

◆ reference

Reference type exposed for STL compatibility.

Definition at line 4068 of file MorphologicalTree.hpp.

◆ value_type

Node id yielded by the iterator.

Definition at line 4062 of file MorphologicalTree.hpp.

Constructor & Destructor Documentation

◆ PathBetweenNodesIterator()

mmcfilters::MorphologicalTree::PathBetweenNodesIterator::PathBetweenNodesIterator ( const MorphologicalTree tree,
const std::vector< NodeId > *  path,
std::size_t  index,
std::size_t  expectedVersion 
)
inline

Creates an iterator over a materialised node path.

Parameters
treeTree topology.
pathNode path updated by the edit.
indexZero-based index.
expectedVersionMutation version required by the operation.

Definition at line 4083 of file MorphologicalTree.hpp.

Member Function Documentation

◆ operator!=()

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

Compares path iterator positions for inequality.

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

Definition at line 4123 of file MorphologicalTree.hpp.

◆ operator*()

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

Returns the current node id in the materialised path.

Returns
The current node id in the materialised path.

Definition at line 4104 of file MorphologicalTree.hpp.

◆ operator++()

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

Advances to the next node in the materialised path.

Returns
Mutable reference to the updated object.

Definition at line 4091 of file MorphologicalTree.hpp.

◆ operator==()

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

Compares path iterator positions.

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

Definition at line 4115 of file MorphologicalTree.hpp.


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