Provides type based views over elements in a diagram.
T | Type of diagram element |
Definition at line 33 of file element_view.h.
#include <element_view.h>
Public Member Functions | |
void | add (std::reference_wrapper< T > element) |
Add reference to diagram element. | |
const reference_vector< T > & | view () const |
Get collection of reference to diagram elements. | |
reference_vector< T > & | view () |
Get collection of reference to diagram elements. | |
common::optional_ref< T > | get (eid_t id) const |
Get typed diagram element by id. | |
bool | is_empty () const |
Check whether the element view is empty. | |
void | remove (const std::set< eid_t > &element_ids) |
template<typename F > | |
void | for_each (F &&f) const |
Private Attributes | |
reference_vector< T > | elements_ |
|
inline |
Add reference to diagram element.
element | Reference to diagram element of specific type |
Definition at line 40 of file element_view.h.
|
inline |
Definition at line 92 of file element_view.h.
|
inline |
Get typed diagram element by id.
id | Global id of a diagram element |
Definition at line 65 of file element_view.h.
|
inline |
Check whether the element view is empty.
Definition at line 81 of file element_view.h.
|
inline |
|
inline |
Get collection of reference to diagram elements.
Definition at line 57 of file element_view.h.
|
inline |
Get collection of reference to diagram elements.
Definition at line 50 of file element_view.h.
|
private |
Definition at line 100 of file element_view.h.