libzypp 17.31.23
|
Save and restore hardlocks. More...
#include <target/HardLocksFile.h>
Public Types | |
typedef pool::PoolTraits::HardLockQueries | Data |
Public Member Functions | |
HardLocksFile (const Pathname &file_r) | |
Ctor taking the file to read/write. | |
const Pathname & | file () const |
Return the file path. | |
const Data & | data () const |
Return the data. | |
void | setData (const Data &data_r) |
Store new Data. | |
Private Member Functions | |
bool | differs (const Data &lhs, const Data &rhs) const |
Helper testing whether two Data differ. | |
Static Private Member Functions | |
static void | load (const Pathname &file_r, Data &data_r) |
Read Data from file_r . | |
static void | store (const Pathname &file_r, const Data &data_r) |
Write Data to file_r . | |
Private Attributes | |
Pathname | _file |
scoped_ptr< Data > | _dataPtr |
Friends | |
std::ostream & | operator<< (std::ostream &str, const HardLocksFile &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const HardLocksFile &obj) |
Stream output. | |
Save and restore hardlocks.
Definition at line 36 of file HardLocksFile.h.
Definition at line 41 of file HardLocksFile.h.
|
inline |
Ctor taking the file to read/write.
Definition at line 45 of file HardLocksFile.h.
|
inline |
Return the file path.
Definition at line 50 of file HardLocksFile.h.
|
inline |
Return the data.
The file is read once on demand. Returns empty Data if the file does not exist or is not readable.
Definition at line 57 of file HardLocksFile.h.
|
inline |
Store new Data.
Write the new Data to file, unless we know it did not change. The directory containing file must exist.
Definition at line 73 of file HardLocksFile.h.
|
inlineprivate |
Helper testing whether two Data differ.
Definition at line 91 of file HardLocksFile.h.
Read Data from file_r
.
Definition at line 35 of file HardLocksFile.cc.
|
staticprivate |
Write Data to file_r
.
Definition at line 49 of file HardLocksFile.cc.
|
friend |
Definition at line 72 of file HardLocksFile.cc.
|
related |
Stream output.
Definition at line 72 of file HardLocksFile.cc.
|
private |
Definition at line 112 of file HardLocksFile.h.
|
mutableprivate |
Definition at line 113 of file HardLocksFile.h.