|
libzypp 17.38.6
|
Track added/removed set items based on an initial set. More...
#include <zypp/base/SetTracker.h>
Public Types | |
| typedef TSet | set_type |
| typedef TSet::key_type | key_type |
| typedef TSet::value_type | value_type |
Public Member Functions | |
| SetTracker () | |
| Default Ctor: empty set. | |
| SetTracker (set_type initial_r) | |
| Ctor taking an initial set. | |
Tracking API | |
| bool | setInitial () |
| (Re-)Start tracking the current set (discards previously tracked changes). | |
| bool | setInitial (set_type new_r) |
| Start tracking a new set (discards previously tracked changes). | |
| bool | set (set_type new_r) |
| Set a new_r set and track changes. | |
| bool | add (const value_type &val_r) |
| Add an element to the set and track changes. | |
| bool | remove (const value_type &val_r) |
| Remove an element from the set and track changes. | |
Query and retrieval | |
| bool | contains (const key_type &key_r) const |
| Whether val_r is in the set. | |
| bool | wasAdded (const key_type &key_r) const |
| Whether val_r is tracked as added. | |
| bool | wasRemoved (const key_type &key_r) const |
| Whether val_r is tracked as removed. | |
| const set_type & | current () const |
| Return the current set. | |
| const set_type & | added () const |
| Return the set of added items. | |
| const set_type & | removed () const |
| Return the set of removed items. | |
Direct manipulation | |
| set_type | _current |
| set_type | _added |
| set_type | _removed |
| set_type & | current () |
| Return the current set. | |
| set_type & | added () |
| Return the set of added items. | |
| set_type & | removed () |
| Return the set of removed items. | |
| static bool | find (const set_type &set_r, const key_type &key_r) |
| template<class TORDERED_SET, typename enable_if = typename TORDERED_SET::key_compare> | |
| static void | setDifference (const TORDERED_SET &lhs, const TORDERED_SET &rhs, TORDERED_SET &result_r) |
| template<class TUNORDERED_SET, typename enable_if = typename TUNORDERED_SET::hasher, typename = void> | |
| static void | setDifference (const TUNORDERED_SET &lhs, const TUNORDERED_SET &rhs, TUNORDERED_SET &result_r) |
Track added/removed set items based on an initial set.
The class maintains the current set of items and also records the changes compared to the initial set (added and removed items) if you use the tracking API.
It is also possible to directly manipulate the three sets.
Definition at line 38 of file SetTracker.h.
| typedef TSet zypp::base::SetTracker< TSet >::set_type |
Definition at line 40 of file SetTracker.h.
| typedef TSet::key_type zypp::base::SetTracker< TSet >::key_type |
Definition at line 41 of file SetTracker.h.
| typedef TSet::value_type zypp::base::SetTracker< TSet >::value_type |
Definition at line 42 of file SetTracker.h.
|
inline |
Default Ctor: empty set.
Definition at line 45 of file SetTracker.h.
|
inline |
Ctor taking an initial set.
Definition at line 49 of file SetTracker.h.
|
inline |
(Re-)Start tracking the current set (discards previously tracked changes).
False (set did not change) Definition at line 58 of file SetTracker.h.
|
inline |
Start tracking a new set (discards previously tracked changes).
Definition at line 64 of file SetTracker.h.
|
inline |
Set a new_r set and track changes.
Definition at line 79 of file SetTracker.h.
|
inline |
Add an element to the set and track changes.
Definition at line 101 of file SetTracker.h.
|
inline |
Remove an element from the set and track changes.
Definition at line 115 of file SetTracker.h.
|
inline |
Whether val_r is in the set.
Definition at line 130 of file SetTracker.h.
|
inline |
Whether val_r is tracked as added.
Definition at line 133 of file SetTracker.h.
|
inline |
Whether val_r is tracked as removed.
Definition at line 136 of file SetTracker.h.
|
inline |
Return the current set.
Definition at line 140 of file SetTracker.h.
|
inline |
Return the current set.
Definition at line 152 of file SetTracker.h.
|
inline |
Return the set of added items.
Definition at line 143 of file SetTracker.h.
|
inline |
Return the set of added items.
Definition at line 155 of file SetTracker.h.
|
inline |
Return the set of removed items.
Definition at line 146 of file SetTracker.h.
|
inline |
Return the set of removed items.
Definition at line 158 of file SetTracker.h.
|
inlinestaticprivate |
Definition at line 163 of file SetTracker.h.
|
inlinestaticprivate |
Definition at line 167 of file SetTracker.h.
|
inlinestaticprivate |
Definition at line 176 of file SetTracker.h.
|
private |
Definition at line 184 of file SetTracker.h.
|
private |
Definition at line 185 of file SetTracker.h.
|
private |
Definition at line 186 of file SetTracker.h.