![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
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 139 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::const_pointer = const value_type* |
types for STL compliance
Definition at line 150 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::const_reference = const value_type& |
types for STL compliance
Definition at line 148 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::difference_type = std::ptrdiff_t |
types for STL compliance
Definition at line 151 of file nodeGraphPart.h.
using gum::NodeGraphPartIteratorSafe::iterator_category = std::forward_iterator_tag |
types for STL compliance
Definition at line 145 of file nodeGraphPart.h.
types for STL compliance
Definition at line 149 of file nodeGraphPart.h.
types for STL compliance
Definition at line 147 of file nodeGraphPart.h.
types for STL compliance
Definition at line 146 of file nodeGraphPart.h.
INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | const NodeGraphPart & | nodes | ) |
default constructor
Definition at line 140 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy constructor
Definition at line 151 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
INLINE gum::NodeGraphPartIteratorSafe::NodeGraphPartIteratorSafe | ( | NodeGraphPartIteratorSafe && | it | ) |
move constructor
Definition at line 162 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
INLINE gum::NodeGraphPartIteratorSafe::~NodeGraphPartIteratorSafe | ( | ) |
destructor
Definition at line 172 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Definition at line 35 of file listener_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
Definition at line 37 of file listener_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
noexceptinherited |
checks whether two iterators point toward different nodes
Definition at line 106 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
inherited |
dereferencing operator
Definition at line 118 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
noexceptinherited |
increment the iterator
Definition at line 111 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | const NodeGraphPartIteratorSafe & | it | ) |
copy assignment operator
Definition at line 178 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
INLINE NodeGraphPartIteratorSafe & gum::NodeGraphPartIteratorSafe::operator= | ( | NodeGraphPartIteratorSafe && | it | ) |
move assignment operator
Definition at line 191 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
noexceptinherited |
checks whether two iterators point toward the same node
Definition at line 100 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectednoexceptinherited |
this function is used by NodeGraphPart to update
Definition at line 125 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
|
protectednoexceptinherited |
ensure that the nodeId is either end() either a valid NodeId
Definition at line 37 of file nodeGraphPart_inl.h.
References gum::Set< Key, Alloc >::emplace().
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 170 of file nodeGraphPart.cpp.
References gum::Set< Key, Alloc >::emplace().
|
friend |
Definition at line 140 of file nodeGraphPart.h.
|
protectedinherited |
the nodegraphpart on which points the iterator
Definition at line 126 of file nodeGraphPart.h.
|
protectedinherited |
the nodeid on which the iterator points currently
Definition at line 129 of file nodeGraphPart.h.
|
protectedinherited |
Definition at line 132 of file nodeGraphPart.h.