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

RpmDb::Logfile Class Reference

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; ... }


Constructor & Destructor Documentation

RpmDb::Logfile::Logfile const Logfile  )  [private]
 

RpmDb::Logfile::Logfile  )  [inline]
 

RpmDb::Logfile::~Logfile  )  [inline]
 


Member Function Documentation

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

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

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

Logfile& RpmDb::Logfile::operator= const Logfile  )  [private]
 

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

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

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


Member Data Documentation

Pathname RpmDb::Logfile::_fname [static, private]
 

ofstream RpmDb::Logfile::_log [static, private]
 

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


The documentation for this class was generated from the following file:
Generated on Mon Sep 12 21:52:14 2005 for yast2-packagemanager by  doxygen 1.4.4