zypp::target::rpm::RpmDb::Logfile Class Reference

Simple wrapper for progress log. More...

List of all members.

Public Member Functions

 Logfile ()
 ~Logfile ()
ostream & operator() (bool timestamp=false)

Static Public Member Functions

static void setFname (const Pathname &fname_r)

Private Member Functions

 Logfile (const Logfile &)
Logfileoperator= (const Logfile &)

Static Private Member Functions

static void openLog ()
static void closeLog ()
static void refUp ()
static void refDown ()

Static Private Attributes

static ofstream _log
static unsigned _refcnt = 0
static Pathname _fname


Detailed Description

Simple wrapper for progress log.

Refcnt, filename and corresponding ofstream are static members. Logfile constructor raises, destructor lowers refcounter. On refcounter changing from 0->1, file is opened. Changing from 1->0 the file is closed. Thus Logfile objects should be local to those functions, writing the log, and must not be stored permanently;

Usage: some methothd () { Logfile progresslog; ... progresslog() << "some message" << endl; ... }

Definition at line 180 of file RpmDb.cc.


Constructor & Destructor Documentation

zypp::target::rpm::RpmDb::Logfile::Logfile const Logfile  )  [private]
 

zypp::target::rpm::RpmDb::Logfile::Logfile  )  [inline]
 

Definition at line 210 of file RpmDb.cc.

zypp::target::rpm::RpmDb::Logfile::~Logfile  )  [inline]
 

Definition at line 211 of file RpmDb.cc.


Member Function Documentation

Logfile& zypp::target::rpm::RpmDb::Logfile::operator= const Logfile  )  [private]
 

static void zypp::target::rpm::RpmDb::Logfile::openLog  )  [inline, static, private]
 

Definition at line 187 of file RpmDb.cc.

References ERR.

static void zypp::target::rpm::RpmDb::Logfile::closeLog  )  [inline, static, private]
 

Definition at line 195 of file RpmDb.cc.

static void zypp::target::rpm::RpmDb::Logfile::refUp  )  [inline, static, private]
 

Definition at line 199 of file RpmDb.cc.

static void zypp::target::rpm::RpmDb::Logfile::refDown  )  [inline, static, private]
 

Definition at line 204 of file RpmDb.cc.

ostream& zypp::target::rpm::RpmDb::Logfile::operator() bool  timestamp = false  )  [inline]
 

Definition at line 212 of file RpmDb.cc.

References zypp::Date::now().

static void zypp::target::rpm::RpmDb::Logfile::setFname const Pathname fname_r  )  [inline, static]
 

Definition at line 218 of file RpmDb.cc.

References MIL.

Referenced by zypp::target::rpm::RpmDb::setInstallationLogfile().


Member Data Documentation

ofstream zypp::target::rpm::RpmDb::Logfile::_log [static, private]
 

Definition at line 184 of file RpmDb.cc.

unsigned zypp::target::rpm::RpmDb::Logfile::_refcnt = 0 [static, private]
 

Definition at line 185 of file RpmDb.cc.

Pathname zypp::target::rpm::RpmDb::Logfile::_fname [static, private]
 

Definition at line 186 of file RpmDb.cc.


The documentation for this class was generated from the following file:
Generated on Thu Jul 6 00:07:35 2006 for zypp by  doxygen 1.4.6