zypp::cache::CacheInitializer Class Reference

#include <CacheInitializer.h>

List of all members.

Public Member Functions

 CacheInitializer (const Pathname &root_r, const Pathname &db_file)
 Tries to initialize the source cache if it was not.
virtual ~CacheInitializer ()
bool justInitialized () const
bool justReinitialized () const

Protected Member Functions

bool tablesCreated () const
void createTables ()
virtual std::ostream & dumpOn (std::ostream &str) const
 Overload to realize stream output.

Private Attributes

RW_pointer< Impl_pimpl
 Pointer to implementation.

Friends

std::ostream & operator<< (std::ostream &str, const CacheInitializer &obj)
 Stream output.

Classes

struct  Impl


Detailed Description

Definition at line 35 of file CacheInitializer.h.


Constructor & Destructor Documentation

zypp::cache::CacheInitializer::CacheInitializer ( const Pathname &  root_r,
const Pathname &  db_file 
)

Tries to initialize the source cache if it was not.

Exceptions:
Exception When cant initialize

Definition at line 48 of file CacheInitializer.cc.

References _pimpl, zypp::filesystem::assert_dir(), sqlite3x::sqlite3_reader::close(), createTables(), sqlite3x::sqlite3_command::executereader(), sqlite3x::sqlite3_reader::getstring(), MIL, sqlite3x::sqlite3_reader::read(), tablesCreated(), WAR, ZYPP_CACHE_SCHEMA_VERSION, and ZYPP_RETHROW.

zypp::cache::CacheInitializer::~CacheInitializer (  )  [virtual]

Definition at line 119 of file CacheInitializer.cc.


Member Function Documentation

bool zypp::cache::CacheInitializer::justInitialized (  )  const

Has the cache been reinitialized? only true when cache was not initialized before and was just initialized with success

Definition at line 109 of file CacheInitializer.cc.

References _pimpl.

Referenced by zypp::cache::CacheStore::Impl::Impl().

bool zypp::cache::CacheInitializer::justReinitialized (  )  const

Has the cache been reinitialized? This is true when the cache was already initialized but an old schema was detected, so the cache was reinitialized in order to get the new schema

Definition at line 114 of file CacheInitializer.cc.

References _pimpl.

bool zypp::cache::CacheInitializer::tablesCreated (  )  const [protected]

Definition at line 124 of file CacheInitializer.cc.

References _pimpl, and zypp::debug::Measure::elapsed().

Referenced by CacheInitializer().

void zypp::cache::CacheInitializer::createTables (  )  [protected]

Definition at line 132 of file CacheInitializer.cc.

References _pimpl, sqlite3x::sqlite3_command::bind(), sqlite3x::sqlite3_command::executenonquery(), MIL, and ZYPP_CACHE_SCHEMA_VERSION.

Referenced by CacheInitializer().

std::ostream & zypp::cache::CacheInitializer::dumpOn ( std::ostream &  str  )  const [protected, virtual]

Overload to realize stream output.

Definition at line 150 of file CacheInitializer.cc.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const CacheInitializer obj 
) [friend]

Stream output.

Definition at line 78 of file CacheInitializer.h.


Member Data Documentation

RW_pointer<Impl> zypp::cache::CacheInitializer::_pimpl [private]

Pointer to implementation.

Definition at line 71 of file CacheInitializer.h.

Referenced by CacheInitializer(), createTables(), justInitialized(), justReinitialized(), and tablesCreated().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:17 2007 for libzypp by  doxygen 1.5.3