![]() |
aGrUM 3.1.1
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 () final | |
| 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 | |
| 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 149 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::const_pointer = const value_type* |
types for STL compliance
Definition at line 160 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::const_reference = const value_type& |
types for STL compliance
Definition at line 158 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::difference_type = std::ptrdiff_t |
types for STL compliance
Definition at line 161 of file nodeGraphPart.h.
| using gum::NodeGraphPartIteratorSafe::iterator_category = std::forward_iterator_tag |
types for STL compliance
Definition at line 155 of file nodeGraphPart.h.
types for STL compliance
Definition at line 159 of file nodeGraphPart.h.
types for STL compliance
Definition at line 157 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 156 of file nodeGraphPart.h.
|
explicit |
default constructor
Definition at line 156 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 167 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 178 of file nodeGraphPart_inl.h.
References gum::NodeGraphPartIterator::NodeGraphPartIterator(), NodeGraphPartIteratorSafe(), GUM_CONNECT, NodeGraphPart, gum::NodeGraphPartIterator::nodes_, and whenNodeDeleted().
|
final |
destructor
Definition at line 188 of file nodeGraphPart_inl.h.
References NodeGraphPartIteratorSafe().
|
inherited |
Definition at line 57 of file listener_inl.h.
References _senders_.
|
inherited |
Definition at line 59 of file listener_inl.h.
References _senders_.
Referenced by gum::__sig__::BasicSignaler< Args >::detach().
|
inherited |
dereferencing operator
Definition at line 134 of file nodeGraphPart_inl.h.
|
noexceptinherited |
increment the iterator
Definition at line 127 of file nodeGraphPart_inl.h.
References NodeGraphPartIterator(), pos_, and validate_().
| INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy assignment operator
Definition at line 194 of file nodeGraphPart_inl.h.
References NodeGraphPartIteratorSafe(), and gum::NodeGraphPartIterator::operator=().
| INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | NodeGraphPartIteratorSafe && | it | ) |
move assignment operator
Definition at line 207 of file nodeGraphPart_inl.h.
References NodeGraphPartIteratorSafe(), and gum::NodeGraphPartIterator::operator=().
|
noexceptinherited |
checks whether two iterators point toward the same node
Definition at line 122 of file nodeGraphPart_inl.h.
References NodeGraphPartIterator(), nodes_, pos_, and valid_.
|
protectednoexceptinherited |
this function is used by NodeGraphPart to update
Definition at line 141 of file nodeGraphPart_inl.h.
|
protectednoexceptinherited |
ensure that the nodeId is either end() either a valid NodeId
Definition at line 59 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 254 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 150 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 136 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 139 of file nodeGraphPart.h.
Referenced by NodeGraphPartIterator(), NodeGraphPartIterator(), operator*(), operator++(), operator=(), operator=(), operator==(), setPos_(), validate_(), and gum::NodeGraphPartIteratorSafe::whenNodeDeleted().
|
protectedinherited |
Definition at line 142 of file nodeGraphPart.h.
Referenced by NodeGraphPartIterator(), NodeGraphPartIterator(), operator*(), operator=(), operator=(), operator==(), setPos_(), validate_(), and gum::NodeGraphPartIteratorSafe::whenNodeDeleted().