12 #ifndef ZYPP_TARGET_SOFTLOCKSFILE_H
13 #define ZYPP_TARGET_SOFTLOCKSFILE_H
39 typedef std::tr1::unordered_set<IdString>
Data;
48 const Pathname &
file()
const
88 if ( lhs.size() != rhs.size() )
90 for_( it, lhs.begin(), lhs.end() )
92 if ( rhs.find( *it ) == rhs.end() )
98 static void load(
const Pathname & file_r,
Data & data_r );
100 static void store(
const Pathname & file_r,
const Data & data_r );
117 #endif // ZYPP_TARGET_SOFTLOCKSFILE_H
bool differs(const Data &lhs, const Data &rhs) const
Helper testing whether two Data differ.
void setData(const Data &data_r)
Store new Data.
const Data & data() const
Return the data.
SoftLocksFile(const Pathname &file_r)
Ctor taking the file to read/write.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
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.
const Pathname & file() const
Return the file path.
friend std::ostream & operator<<(std::ostream &str, const SoftLocksFile &obj)
std::ostream & operator<<(std::ostream &str, const CommitPackageCache &obj)
scoped_ptr< Data > _dataPtr
Save and restore soft locks.
std::tr1::unordered_set< IdString > Data