Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PkgSplit Class Reference

Represents information of splitprovides. More...

#include <PkgSplit.h>

List of all members.

Public Member Functions

 PkgSplit ()
 PkgSplit (const std::string &splitprovides_r, const bool quiet_r=false)
 PkgSplit (const PkgName &ipkg_r, const Pathname &file_r)
 ~PkgSplit ()
bool valid () const
const PkgNameipkg () const
const Pathnamefile () const

Private Attributes

PkgName _ipkg
Pathname _file

Friends

std::ostream & operator<< (std::ostream &str, const PkgSplit &obj)
bool std::less (const PkgSplit &lhs, const PkgSplit &rhs) const


Detailed Description

Represents information of splitprovides.

Syntax for splitprovides is: pkgname:/absolute/path

A package that contains a splitprovides partially replaces an installed<

package pkgname, iff the installed pkgname contains /absolute/path in it's filelist.

The indicator file /absolute/path is one of the files that were moved out of pkgname and into this package, as the package was slpitted.

If an unsplitted version of pkgname is replaced (e.g. on update), this package should be automatically set to install.


Constructor & Destructor Documentation

PkgSplit::PkgSplit  )  [inline]
 

Default constructor

PkgSplit::PkgSplit const std::string &  splitprovides_r,
const bool  quiet_r = false
 

Construct from string "pkgname:/absolute/path". If the string does not form a valid splitprovides, an error is reported, unless quiet_r is true. To form a valid splitprovides, the string must not contain whitespace and neither pkgname nor path may be empty.

PkgSplit::PkgSplit const PkgName ipkg_r,
const Pathname file_r
 

Construct from PkgName and Pathname.

PkgSplit::~PkgSplit  ) 
 


Member Function Documentation

const Pathname& PkgSplit::file  )  const [inline]
 

Returns the file that must be owned by the installed package.

const PkgName& PkgSplit::ipkg  )  const [inline]
 

Returns the name of the package that has to be installed.

bool PkgSplit::valid  )  const [inline]
 

Return true if neither PkgName nor Pathname are empty. Usefull in conjunction with PkgSplit( string, true ) in e.g. parser to filter out splitprovides.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  str,
const PkgSplit obj
[friend]
 

Stream output as 'ipkg:/file'

bool std::less const PkgSplit lhs,
const PkgSplit rhs
const [friend]
 

Order to be used by associative std::container (set/map). Lexicographic by ipkg, then file. Do not change this ordering! We rely on it.

A matter of taste, as 'operator<' would do the same job. But I don't like it in classes where it's meaning isn't obvious.


Member Data Documentation

Pathname PkgSplit::_file [private]
 

PkgName PkgSplit::_ipkg [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6