libzypp 17.31.7
zypp::target::SolvIdentFile Class Reference

Save and restore a list of solvable names (ident IdString) More...

#include <target/SolvIdentFile.h>

Public Types

typedef std::unordered_set< IdStringData

Public Member Functions

 SolvIdentFile (const Pathname &file_r)
 Ctor taking the file to read/write. More...
const Pathnamefile () const
 Return the file path. More...
const Datadata () const
 Return the data. More...
void setData (const Data &data_r)
 Store new Data. More...

Private Member Functions

bool differs (const Data &lhs, const Data &rhs) const
 Helper testing whether two Data differ. More...

Static Private Member Functions

static void load (const Pathname &file_r, Data &data_r)
 Read Data from file_r. More...
static void store (const Pathname &file_r, const Data &data_r)
 Write Data to file_r. More...

Private Attributes

Pathname _file
scoped_ptr< Data_dataPtr


std::ostream & operator<< (std::ostream &str, const SolvIdentFile &obj)

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const SolvIdentFile &obj)
 Stream output. More...

Detailed Description

Save and restore a list of solvable names (ident IdString)

Definition at line 33 of file SolvIdentFile.h.

Member Typedef Documentation

◆ Data

typedef std::unordered_set<IdString> zypp::target::SolvIdentFile::Data

Definition at line 37 of file SolvIdentFile.h.

Constructor & Destructor Documentation

◆ SolvIdentFile()

zypp::target::SolvIdentFile::SolvIdentFile ( const Pathname file_r)

Ctor taking the file to read/write.

Definition at line 41 of file SolvIdentFile.h.

Member Function Documentation

◆ file()

const Pathname & zypp::target::SolvIdentFile::file ( ) const

Return the file path.

Definition at line 46 of file SolvIdentFile.h.

◆ data()

const Data & zypp::target::SolvIdentFile::data ( ) const

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 53 of file SolvIdentFile.h.

◆ setData()

void zypp::target::SolvIdentFile::setData ( const Data data_r)

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 69 of file SolvIdentFile.h.

◆ differs()

bool zypp::target::SolvIdentFile::differs ( const Data lhs,
const Data rhs 
) const

Helper testing whether two Data differ.

Definition at line 83 of file SolvIdentFile.h.

◆ load()

void zypp::target::SolvIdentFile::load ( const Pathname file_r,
Data data_r 

Read Data from file_r.

Definition at line 34 of file

◆ store()

void zypp::target::SolvIdentFile::store ( const Pathname file_r,
const Data data_r 

Write Data to file_r.

Definition at line 54 of file

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  str,
const SolvIdentFile obj 

Definition at line 88 of file

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  str,
const SolvIdentFile obj 

Stream output.

Definition at line 88 of file

Member Data Documentation

◆ _file

Pathname zypp::target::SolvIdentFile::_file

Definition at line 101 of file SolvIdentFile.h.

◆ _dataPtr

scoped_ptr<Data> zypp::target::SolvIdentFile::_dataPtr

Definition at line 102 of file SolvIdentFile.h.

The documentation for this class was generated from the following files: