libzypp  13.10.6
zypp::DiskUsage Class Reference

#include <DiskUsage.h>

Classes

struct  Entry
 Holds data about how much space will be needed per directory. More...
 

Public Types

typedef EntrySet::iterator iterator
 
typedef EntrySet::reverse_iterator reverse_iterator
 
typedef EntrySet::const_iterator const_iterator
 
typedef
EntrySet::const_reverse_iterator 
const_reverse_iterator
 

Public Member Functions

 DiskUsage ()
 
void add (const Entry &newent_r)
 Add an entry. More...
 
void add (const std::string &dirname_r, const unsigned &size_r=0, const unsigned &files_r=0)
 Add an entry. More...
 
bool empty () const
 Whether there is no entry available. More...
 
unsigned size () const
 Number of entries. More...
 
void clear ()
 Clear EntrySet. More...
 
Entry extract (const std::string &dirname_r)
 Sum up any entries for dirname_r and its descendants and remove them on the fly. More...
 
iterator begin ()
 Forward iterator pointing to the first entry (if any) More...
 
iterator end ()
 Forward iterator pointing behind the last entry. More...
 
reverse_iterator rbegin ()
 Reverse iterator pointing to the last entry (if any) More...
 
reverse_iterator rend ()
 Reverse iterator pointing before the first entry. More...
 
const_iterator begin () const
 Forward const iterator pointing to the first entry (if any) More...
 
const_iterator end () const
 Forward const iterator pointing behind the last entry. More...
 
const_reverse_iterator rbegin () const
 Reverse const iterator pointing to the last entry (if any) More...
 
const_reverse_iterator rend () const
 Reverse const iterator pointing before the first entry. More...
 

Private Types

typedef std::set< EntryEntrySet
 

Private Attributes

EntrySet _dirs
 

Friends

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

Detailed Description

Definition at line 22 of file DiskUsage.h.

Member Typedef Documentation

typedef std::set<Entry> zypp::DiskUsage::EntrySet
private

Definition at line 89 of file DiskUsage.h.

typedef EntrySet::iterator zypp::DiskUsage::iterator

Definition at line 129 of file DiskUsage.h.

typedef EntrySet::reverse_iterator zypp::DiskUsage::reverse_iterator

Definition at line 130 of file DiskUsage.h.

typedef EntrySet::const_iterator zypp::DiskUsage::const_iterator

Definition at line 149 of file DiskUsage.h.

typedef EntrySet::const_reverse_iterator zypp::DiskUsage::const_reverse_iterator

Definition at line 150 of file DiskUsage.h.

Constructor & Destructor Documentation

zypp::DiskUsage::DiskUsage ( )
inline

Definition at line 93 of file DiskUsage.h.

Member Function Documentation

void zypp::DiskUsage::add ( const Entry newent_r)
inline

Add an entry.

If already present, sum up the new entries size and files value.

Definition at line 97 of file DiskUsage.h.

void zypp::DiskUsage::add ( const std::string &  dirname_r,
const unsigned &  size_r = 0,
const unsigned &  files_r = 0 
)
inline

Add an entry.

If already present, sum up the new entries size and files value.

Definition at line 106 of file DiskUsage.h.

bool zypp::DiskUsage::empty ( ) const
inline

Whether there is no entry available.

Definition at line 112 of file DiskUsage.h.

unsigned zypp::DiskUsage::size ( ) const
inline

Number of entries.

Definition at line 116 of file DiskUsage.h.

void zypp::DiskUsage::clear ( )
inline

Clear EntrySet.

Definition at line 120 of file DiskUsage.h.

DiskUsage::Entry zypp::DiskUsage::extract ( const std::string &  dirname_r)

Sum up any entries for dirname_r and its descendants and remove them on the fly.

Return the result.

Definition at line 25 of file DiskUsage.cc.

iterator zypp::DiskUsage::begin ( )
inline

Forward iterator pointing to the first entry (if any)

Definition at line 135 of file DiskUsage.h.

iterator zypp::DiskUsage::end ( )
inline

Forward iterator pointing behind the last entry.

Definition at line 139 of file DiskUsage.h.

reverse_iterator zypp::DiskUsage::rbegin ( )
inline

Reverse iterator pointing to the last entry (if any)

Definition at line 143 of file DiskUsage.h.

reverse_iterator zypp::DiskUsage::rend ( )
inline

Reverse iterator pointing before the first entry.

Definition at line 147 of file DiskUsage.h.

const_iterator zypp::DiskUsage::begin ( ) const
inline

Forward const iterator pointing to the first entry (if any)

Definition at line 155 of file DiskUsage.h.

const_iterator zypp::DiskUsage::end ( ) const
inline

Forward const iterator pointing behind the last entry.

Definition at line 159 of file DiskUsage.h.

const_reverse_iterator zypp::DiskUsage::rbegin ( ) const
inline

Reverse const iterator pointing to the last entry (if any)

Definition at line 163 of file DiskUsage.h.

const_reverse_iterator zypp::DiskUsage::rend ( ) const
inline

Reverse const iterator pointing before the first entry.

Definition at line 167 of file DiskUsage.h.

Friends And Related Function Documentation

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

Definition at line 80 of file DiskUsage.cc.

Member Data Documentation

EntrySet zypp::DiskUsage::_dirs
private

Definition at line 90 of file DiskUsage.h.


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