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

PkgDuMaster Class Reference

PMPackageManager helper to collect disk usage info. More...

#include <PkgDu.h>

List of all members.

Public Member Functions

 PkgDuMaster ()
 ~PkgDuMaster ()
unsigned sync_count () const
unsigned resetStats ()
void setMountPoints (const std::set< MountPoint > &mountpoints_r)
const std::set< MountPoint > & mountpoints () const
FSize pkg_diff () const
void addSrcPkgs (const FSize &srcSize_r)

Private Member Functions

void newcount ()
void add (FSize *data_r)
void sub (FSize *data_r)

Private Attributes

unsigned _count
std::set< MountPoint_mountpoints
FSize _pkg_diff
std::string _src_on

Static Private Attributes

unsigned _counter = 0

Friends

std::ostream & operator<< (std::ostream &str, const PkgDuMaster &obj)
std::ostream & operator<< (std::ostream &str, const std::set< MountPoint > &obj)


Detailed Description

PMPackageManager helper to collect disk usage info.

The per package diskusage calculation perdormed by PkgDuSlave is based on the set of mountpoint data held within the PkgDuMaster.

Asserted: The set of MountPoints is alphabetically ordered by MountPoint::_mountpoint.

Asserted: Whenever the set of MountPoints changes (add/remove mountpoints or changing a mountpoints _blocksize value), PkgDuMaster::_count must be incremented.


Constructor & Destructor Documentation

PkgDuMaster::PkgDuMaster  ) 
 

PkgDuMaster::~PkgDuMaster  ) 
 


Member Function Documentation

void PkgDuMaster::add FSize data_r  )  [private]
 

Add per package data stored within a PkgDuSlave.

void PkgDuMaster::addSrcPkgs const FSize srcSize_r  ) 
 

Add size of source packages to install

const std::set<MountPoint>& PkgDuMaster::mountpoints  )  const [inline]
 

Return the set of mountoints.

void PkgDuMaster::newcount  )  [private]
 

Increment _count.

FSize PkgDuMaster::pkg_diff  )  const [inline]
 

Total pkg_diff (summ of all partitions)

unsigned PkgDuMaster::resetStats  ) 
 

Reset package usage to 0 for all mounpoints. Returns the number of mountoints currently stored.

void PkgDuMaster::setMountPoints const std::set< MountPoint > &  mountpoints_r  ) 
 

Set a new set of mountpoints.

void PkgDuMaster::sub FSize data_r  )  [private]
 

Subtract per package data stored within a PkgDuSlave.

unsigned PkgDuMaster::sync_count  )  const [inline]
 

Return current _count value.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  str,
const std::set< MountPoint > &  obj
[friend]
 

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


Member Data Documentation

unsigned PkgDuMaster::_count [private]
 

Asserted: Incremented whenever vital mountpoint data change.

unsigned PkgDuMaster::_counter = 0 [static, private]
 

std::set<MountPoint> PkgDuMaster::_mountpoints [private]
 

set of mountpoints

FSize PkgDuMaster::_pkg_diff [private]
 

Total pkg_diff

std::string PkgDuMaster::_src_on [private]
 

Mountpoint of partition where src packages are installed


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