![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Safe iterator on the node set of a graph. More...
#include <nodeGraphPart.h>
Public Types | |
| using | iterator_category = std::forward_iterator_tag |
| types for STL compliance | |
| using | value_type = NodeId |
| types for STL compliance | |
| using | reference = value_type& |
| types for STL compliance | |
| using | const_reference = const value_type& |
| types for STL compliance | |
| using | pointer = value_type* |
| types for STL compliance | |
| using | const_pointer = const value_type* |
| types for STL compliance | |
| using | difference_type = std::ptrdiff_t |
| types for STL compliance | |
Public Member Functions | |
| void | _attachSignal_ (__sig__::ISignaler *sender) |
| void | _detachSignal_ (__sig__::ISignaler *sender) |
Constructors / Destructors | |
| NodeGraphPartIteratorSafe (const NodeGraphPart &nodes) | |
| default constructor | |
| NodeGraphPartIteratorSafe (const NodeGraphPartIteratorSafe &it) | |
| copy constructor | |
| NodeGraphPartIteratorSafe (NodeGraphPartIteratorSafe &&it) | |
| move constructor | |
| ~NodeGraphPartIteratorSafe () | |
| destructor | |
Operators | |
| NodeGraphPartIteratorSafe & | operator= (const NodeGraphPartIteratorSafe &it) |
| copy assignment operator | |
| NodeGraphPartIteratorSafe & | operator= (NodeGraphPartIteratorSafe &&it) |
| move assignment operator | |
Accessors / Modifiers | |
| void | whenNodeDeleted (const void *src, NodeId id) |
| called when a node is deleted in the iterated NodeGraphPart | |
Operators | |
| bool | operator== (const NodeGraphPartIterator &it) const noexcept |
| checks whether two iterators point toward the same node | |
| bool | operator!= (const NodeGraphPartIterator &it) const noexcept |
| checks whether two iterators point toward different nodes | |
| NodeGraphPartIterator & | operator++ () noexcept |
| increment the iterator | |
| value_type | operator* () const |
| dereferencing operator | |
Protected Member Functions | |
| void | setPos_ (NodeId id) noexcept |
| this function is used by NodeGraphPart to update | |
| void | validate_ () noexcept |
| ensure that the nodeId is either end() either a valid NodeId | |
Protected Attributes | |
| const NodeGraphPart * | nodes_ |
| the nodegraphpart on which points the iterator | |
| NodeId | pos_ {0} |
| the nodeid on which the iterator points currently | |
| bool | valid_ {false} |
Private Types | |
| using | Senders_list = std::vector< __sig__::ISignaler* > |
| Alias for the list of signal senders. | |
Private Attributes | |
| Senders_list | _senders_ |
Friends | |
| class | NodeGraphPart |
Safe iterator on the node set of a graph.
Definition at line 157 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::const_pointer = const value_type* |
types for STL compliance
Definition at line 168 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::const_reference = const value_type& |
types for STL compliance
Definition at line 166 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::difference_type = std::ptrdiff_t |
types for STL compliance
Definition at line 169 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::iterator_category = std::forward_iterator_tag |
types for STL compliance
Definition at line 163 of file nodeGraphPart.h.
types for STL compliance
Definition at line 167 of file nodeGraphPart.h.
types for STL compliance
Definition at line 165 of file nodeGraphPart.h.
|
privateinherited |
Alias for the list of signal senders.
Definition at line 96 of file listener.h.
types for STL compliance
Definition at line 164 of file nodeGraphPart.h.
| INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | const NodeGraphPart & | nodes | ) |
default constructor
Definition at line 161 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::NodeGraphPartIterator(), NodeGraphPartIteratorSafe(), GUM_CONNECT, NodeGraphPart, and whenNodeDeleted().
Referenced by NodeGraphPartIteratorSafe(), NodeGraphPartIteratorSafe(), NodeGraphPartIteratorSafe(), ~NodeGraphPartIteratorSafe(), operator=(), and operator=().
| INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy constructor
Definition at line 172 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::NodeGraphPartIterator(), NodeGraphPartIteratorSafe(), GUM_CONNECT, NodeGraphPart, gum::NodeGraphPartIterator::nodes_, and whenNodeDeleted().
| INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | NodeGraphPartIteratorSafe && | it | ) |
move constructor
Definition at line 183 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::NodeGraphPartIterator(), NodeGraphPartIteratorSafe(), GUM_CONNECT, NodeGraphPart, gum::NodeGraphPartIterator::nodes_, and whenNodeDeleted().
| INLINE gum::NodeGraphPartIteratorSafe::~NodeGraphPartIteratorSafe | ( | ) |
destructor
Definition at line 193 of file nodeGraphPart_inl.h.
References NodeGraphPartIteratorSafe().
|
inherited |
Definition at line 56 of file listener_inl.h.
References _senders_.
|
inherited |
|
noexceptinherited |
checks whether two iterators point toward different nodes
Definition at line 127 of file nodeGraphPart_inl.h.
References NodeGraphPartIterator(), and gum::operator==().
|
inherited |
dereferencing operator
Definition at line 139 of file nodeGraphPart_inl.h.
|
noexceptinherited |
increment the iterator
Definition at line 132 of file nodeGraphPart_inl.h.
References NodeGraphPartIterator(), pos_, and validate_().
| INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy assignment operator
Definition at line 199 of file nodeGraphPart_inl.h.
References NodeGraphPartIteratorSafe(), and gum::NodeGraphPartIterator::operator=().
| INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | NodeGraphPartIteratorSafe && | it | ) |
move assignment operator
Definition at line 212 of file nodeGraphPart_inl.h.
References NodeGraphPartIteratorSafe(), and gum::NodeGraphPartIterator::operator=().
|
noexceptinherited |
checks whether two iterators point toward the same node
Definition at line 121 of file nodeGraphPart_inl.h.
References NodeGraphPartIterator(), nodes_, pos_, and valid_.
|
protectednoexceptinherited |
this function is used by NodeGraphPart to update
Definition at line 146 of file nodeGraphPart_inl.h.
|
protectednoexceptinherited |
ensure that the nodeId is either end() either a valid NodeId
Definition at line 58 of file nodeGraphPart_inl.h.
References nodes_, pos_, and valid_.
Referenced by gum::NodeGraphPart::begin(), gum::NodeGraphPart::beginSafe(), and 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 190 of file nodeGraphPart.cpp.
References gum::NodeGraphPartIterator::nodes_, gum::NodeGraphPartIterator::pos_, and gum::NodeGraphPartIterator::valid_.
Referenced by NodeGraphPartIteratorSafe(), NodeGraphPartIteratorSafe(), and NodeGraphPartIteratorSafe().
|
friend |
Definition at line 158 of file nodeGraphPart.h.
References NodeGraphPart.
Referenced by NodeGraphPartIteratorSafe(), NodeGraphPartIteratorSafe(), NodeGraphPartIteratorSafe(), and NodeGraphPart.
|
privateinherited |
Definition at line 113 of file listener.h.
Referenced by Listener(), ~Listener(), _attachSignal_(), and _detachSignal_().
|
protectedinherited |
the nodegraphpart on which points the iterator
Definition at line 144 of file nodeGraphPart.h.
Referenced by NodeGraphPartIterator(), NodeGraphPartIterator(), NodeGraphPartIterator(), gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe(), gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe(), operator=(), operator=(), operator==(), setPos_(), validate_(), and gum::NodeGraphPartIteratorSafe::whenNodeDeleted().
|
protectedinherited |
the nodeid on which the iterator points currently
Definition at line 147 of file nodeGraphPart.h.
Referenced by NodeGraphPartIterator(), NodeGraphPartIterator(), operator*(), operator++(), operator=(), operator=(), operator==(), setPos_(), validate_(), and gum::NodeGraphPartIteratorSafe::whenNodeDeleted().
|
protectedinherited |
Definition at line 150 of file nodeGraphPart.h.
Referenced by NodeGraphPartIterator(), NodeGraphPartIterator(), operator*(), operator=(), operator=(), operator==(), setPos_(), validate_(), and gum::NodeGraphPartIteratorSafe::whenNodeDeleted().