libzypp 17.31.23
|
Simple serial number watcher. More...
#include <base/SerialNumber.h>
Public Member Functions | |
SerialNumberWatcher (unsigned serial_r=(unsigned) -1) | |
Ctor taking an initial serial value. | |
SerialNumberWatcher (const SerialNumber &serial_r) | |
Ctor taking an initial serial value. | |
virtual | ~SerialNumberWatcher () |
Dtor. | |
bool | isDirty (unsigned serial_r) const |
Return whether serial_r differs. | |
bool | isDirty (const SerialNumber &serial_r) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | isClean (unsigned serial_r) const |
Return whether serial_r is still unchanged. | |
bool | isClean (const SerialNumber &serial_r) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | remember (unsigned serial_r) const |
Return isDirty, storing serial_r as new value. | |
bool | remember (const SerialNumber &serial_r) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Private Attributes | |
unsigned | _serial |
Friends | |
std::ostream & | operator<< (std::ostream &str, const SerialNumberWatcher &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const SerialNumberWatcher &obj) |
Stream output. | |
Simple serial number watcher.
SerialNumberWatcher remembers a serial number and tells whenever new numbers you feed change.
All methods are overloaded to take an \unsigned or a const SerialNumber &
as argument.
Definition at line 122 of file SerialNumber.h.
zypp::SerialNumberWatcher::SerialNumberWatcher | ( | unsigned | serial_r = (unsigned)-1 | ) |
Ctor taking an initial serial
value.
A default constructed SerialNumberWatcher remembers the serial number (unsigned)-1
. So it is most likely the the 1st call to remember returns isDirty.
Vice versa, initializing the SerialNumberWatcher with the current SerialNumber, most likely prevents the 1st to remember to return isDirty.
Definition at line 68 of file SerialNumber.cc.
zypp::SerialNumberWatcher::SerialNumberWatcher | ( | const SerialNumber & | serial_r | ) |
Ctor taking an initial serial
value.
Definition at line 77 of file SerialNumber.cc.
|
virtual |
Dtor.
Definition at line 86 of file SerialNumber.cc.
|
inline |
Return whether serial_r
differs.
Definition at line 145 of file SerialNumber.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 148 of file SerialNumber.h.
|
inline |
Return whether serial_r
is still unchanged.
Definition at line 152 of file SerialNumber.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 155 of file SerialNumber.h.
|
inline |
Return isDirty, storing serial_r
as new value.
Definition at line 160 of file SerialNumber.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 170 of file SerialNumber.h.
|
friend |
Definition at line 94 of file SerialNumber.cc.
|
related |
Stream output.
Definition at line 94 of file SerialNumber.cc.
|
mutableprivate |
Definition at line 174 of file SerialNumber.h.