![]() |
aGrUM
0.16.0
|
Safe iterator on the node set of a graph. More...
#include <nodeGraphPart.h>
Public Member Functions | |
void | attachSignal__ (__sig__::ISignaler *sender) |
void | detachSignal__ (__sig__::ISignaler *sender) |
Constructors / Destructors | |
NodeGraphPartIteratorSafe (const NodeGraphPart &nodes) | |
default constructor More... | |
NodeGraphPartIteratorSafe (const NodeGraphPartIteratorSafe &it) | |
copy constructor More... | |
NodeGraphPartIteratorSafe (NodeGraphPartIteratorSafe &&it) | |
move constructor More... | |
~NodeGraphPartIteratorSafe () | |
destructor More... | |
Operators | |
NodeGraphPartIteratorSafe & | operator= (const NodeGraphPartIteratorSafe &it) |
copy assignment operator More... | |
NodeGraphPartIteratorSafe & | operator= (NodeGraphPartIteratorSafe &&it) |
move assignment operator More... | |
Accessors / Modifiers | |
void | whenNodeDeleted (const void *src, NodeId id) |
called when a node is deleted in the iterated NodeGraphPart More... | |
Operators | |
bool | operator== (const NodeGraphPartIterator &it) const noexcept |
checks whether two iterators point toward the same node More... | |
bool | operator!= (const NodeGraphPartIterator &it) const noexcept |
checks whether two iterators point toward different nodes More... | |
NodeGraphPartIterator & | operator++ () noexcept |
increment the iterator More... | |
value_type | operator* () const |
dereferencing operator More... | |
Public Types | |
using | iterator_category = std::forward_iterator_tag |
types for STL compliance More... | |
using | value_type = NodeId |
types for STL compliance More... | |
using | reference = value_type & |
types for STL compliance More... | |
using | const_reference = const value_type & |
types for STL compliance More... | |
using | pointer = value_type * |
types for STL compliance More... | |
using | const_pointer = const value_type * |
types for STL compliance More... | |
using | difference_type = std::ptrdiff_t |
types for STL compliance More... | |
Protected Attributes | |
const NodeGraphPart * | _nodes |
the nodegraphpart on which points the iterator More... | |
NodeId | _pos {0} |
the nodeid on which the iterator points currently More... | |
bool | _valid {false} |
Protected Member Functions | |
void | _setPos (NodeId id) noexcept |
this function is used by NodeGraphPart to update More... | |
void | _validate () noexcept |
ensure that the nodeId is either end() either a valid NodeId More... | |
Friends | |
class | NodeGraphPart |
Safe iterator on the node set of a graph.
Definition at line 140 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::const_pointer = const value_type* |
types for STL compliance
Definition at line 153 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::const_reference = const value_type& |
types for STL compliance
Definition at line 151 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::difference_type = std::ptrdiff_t |
types for STL compliance
Definition at line 154 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::iterator_category = std::forward_iterator_tag |
types for STL compliance
Definition at line 148 of file nodeGraphPart.h.
types for STL compliance
Definition at line 152 of file nodeGraphPart.h.
types for STL compliance
Definition at line 150 of file nodeGraphPart.h.
types for STL compliance
Definition at line 149 of file nodeGraphPart.h.
INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | const NodeGraphPart & | nodes | ) |
default constructor
Definition at line 152 of file nodeGraphPart_inl.h.
References GUM_CONNECT, and whenNodeDeleted().
INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy constructor
Definition at line 164 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::_nodes, GUM_CONNECT, and whenNodeDeleted().
INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | NodeGraphPartIteratorSafe && | it | ) |
move constructor
Definition at line 176 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::_nodes, GUM_CONNECT, and whenNodeDeleted().
INLINE gum::NodeGraphPartIteratorSafe::~NodeGraphPartIteratorSafe | ( | ) |
destructor
Definition at line 187 of file nodeGraphPart_inl.h.
References operator=().
|
protectednoexceptinherited |
this function is used by NodeGraphPart to update
Definition at line 137 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::_nodes, gum::NodeGraphPartIterator::_pos, gum::NodeGraphPartIterator::_valid, gum::NodeGraphPart::bound(), and gum::NodeGraphPart::exists().
|
protectednoexceptinherited |
ensure that the nodeId is either end() either a valid NodeId
Definition at line 38 of file nodeGraphPart_inl.h.
References gum::NodeGraphPart::__inHoles(), gum::NodeGraphPartIterator::_nodes, gum::NodeGraphPartIterator::_pos, gum::NodeGraphPartIterator::_valid, and gum::NodeGraphPart::bound().
Referenced by gum::NodeGraphPart::begin(), gum::NodeGraphPart::beginSafe(), and gum::NodeGraphPartIterator::operator++().
|
inherited |
|
inherited |
|
noexceptinherited |
checks whether two iterators point toward different nodes
Definition at line 115 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::operator==().
|
inherited |
dereferencing operator
Definition at line 128 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::_pos, gum::NodeGraphPartIterator::_valid, and GUM_ERROR.
|
noexceptinherited |
increment the iterator
Definition at line 121 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::_pos, and gum::NodeGraphPartIterator::_validate().
INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy assignment operator
Definition at line 193 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::operator=().
Referenced by ~NodeGraphPartIteratorSafe().
INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | NodeGraphPartIteratorSafe && | it | ) |
move assignment operator
Definition at line 206 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::operator=().
|
noexceptinherited |
checks whether two iterators point toward the same node
Definition at line 108 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::_nodes, gum::NodeGraphPartIterator::_pos, and gum::NodeGraphPartIterator::_valid.
Referenced by gum::NodeGraphPartIterator::operator!=(), and gum::NodeGraphPart::operator!=().
void gum::NodeGraphPartIteratorSafe::whenNodeDeleted | ( | const void * | src, |
NodeId | id | ||
) |
called when a node is deleted in the iterated NodeGraphPart
src | the NodeGraphPart |
id | id of deleted node |
Definition at line 171 of file nodeGraphPart.cpp.
Referenced by NodeGraphPartIteratorSafe().
|
friend |
Definition at line 143 of file nodeGraphPart.h.
|
protectedinherited |
the nodegraphpart on which points the iterator
Definition at line 127 of file nodeGraphPart.h.
Referenced by gum::NodeGraphPartIterator::_setPos(), gum::NodeGraphPartIterator::_validate(), NodeGraphPartIteratorSafe(), gum::NodeGraphPartIterator::operator=(), and gum::NodeGraphPartIterator::operator==().
|
protectedinherited |
the nodeid on which the iterator points currently
Definition at line 130 of file nodeGraphPart.h.
Referenced by gum::NodeGraphPartIterator::_setPos(), gum::NodeGraphPartIterator::_validate(), gum::NodeGraphPartIterator::operator*(), gum::NodeGraphPartIterator::operator++(), gum::NodeGraphPartIterator::operator=(), and gum::NodeGraphPartIterator::operator==().
|
protectedinherited |
Definition at line 133 of file nodeGraphPart.h.
Referenced by gum::NodeGraphPartIterator::_setPos(), gum::NodeGraphPartIterator::_validate(), gum::NodeGraphPartIterator::operator*(), gum::NodeGraphPartIterator::operator=(), and gum::NodeGraphPartIterator::operator==().