zypp::storage::PersistentStorage Class Reference

#include <PersistentStorage.h>

Inheritance diagram for zypp::storage::PersistentStorage:
[legend]

List of all members.

Public Member Functions

 PersistentStorage ()
 Default ctor.
 ~PersistentStorage ()
 Dtor.
void doTest ()
void init (const Pathname &root)
 Initializes the Storage when the system is located in some root path.
bool isInitialized () const
 true is backend was already initialized
Date timestamp () const
 last modification
void storeObject (ResObject::constPtr resolvable)
 Stores a Resolvable in the active backend.
void deleteObject (ResObject::constPtr resolvable)
 Deletes a Resolvable from the active backend.
std::list
< ResObject::Ptr
storedObjects () const
 Query for installed Resolvables.
std::list
< ResObject::Ptr
storedObjects (const Resolvable::Kind kind) const
 Query for installed Resolvables of a certain kind.
std::list
< ResObject::Ptr
storedObjects (const Resolvable::Kind kind, const std::string &name, bool partial_match=false) const
 Query for installed Resolvables of a certain kind by name partial_match allows for text search.
void setObjectFlag (ResObject::constPtr resolvable, const std::string &flag)
 Set a flag for a resolvable.
void removeObjectFlag (ResObject::constPtr resolvable, const std::string &flag)
 Removes a flag for a resolvable.
std::set< std::string > objectFlags (ResObject::constPtr resolvable) const
 Returns a set of flags a resolvable has stored.
bool doesObjectHasFlag (ResObject::constPtr resolvable, const std::string &flag) const
 True if the resolvable has that flag.
void setFlag (const std::string &key, const std::string &flag)
void removeFlag (const std::string &key, const std::string &flag)
std::set< std::string > flags (const std::string &key) const
bool hasFlag (const std::string &key, const std::string &flag) const

Private Types

typedef
intrusive_ptr
< PersistentStorage
Ptr
typedef
intrusive_ptr< const
PersistentStorage
constPtr

Private Attributes

shared_ptr< Privated

Friends

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

Classes

struct  Private


Detailed Description

Definition at line 36 of file PersistentStorage.h.


Member Typedef Documentation

typedef intrusive_ptr<PersistentStorage> zypp::storage::PersistentStorage::Ptr [private]

Definition at line 39 of file PersistentStorage.h.

typedef intrusive_ptr<const PersistentStorage> zypp::storage::PersistentStorage::constPtr [private]

Definition at line 40 of file PersistentStorage.h.


Constructor & Destructor Documentation

zypp::storage::PersistentStorage::PersistentStorage (  ) 

Default ctor.

Definition at line 48 of file PersistentStorage.cc.

References DBG.

zypp::storage::PersistentStorage::~PersistentStorage (  ) 

Dtor.

Definition at line 69 of file PersistentStorage.cc.


Member Function Documentation

void zypp::storage::PersistentStorage::doTest (  ) 

Definition at line 77 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::init ( const Pathname &  root  ) 

Initializes the Storage when the system is located in some root path.

THIS MUST BE CALLED BEFORE DOING ANY OPERATION

Definition at line 54 of file PersistentStorage.cc.

References d.

Referenced by zypp::target::TargetImpl::enableStorage().

bool zypp::storage::PersistentStorage::isInitialized (  )  const

true is backend was already initialized

Definition at line 59 of file PersistentStorage.cc.

References d.

Date zypp::storage::PersistentStorage::timestamp (  )  const

last modification

Definition at line 83 of file PersistentStorage.cc.

References d.

Referenced by zypp::target::TargetImpl::timestamp().

void zypp::storage::PersistentStorage::storeObject ( ResObject::constPtr  resolvable  ) 

Stores a Resolvable in the active backend.

Definition at line 89 of file PersistentStorage.cc.

References d.

Referenced by zypp::target::TargetImpl::commit().

void zypp::storage::PersistentStorage::deleteObject ( ResObject::constPtr  resolvable  ) 

Deletes a Resolvable from the active backend.

Definition at line 95 of file PersistentStorage.cc.

References d.

Referenced by zypp::target::TargetImpl::commit().

std::list< ResObject::Ptr > zypp::storage::PersistentStorage::storedObjects (  )  const

Query for installed Resolvables.

Definition at line 101 of file PersistentStorage.cc.

References d.

Referenced by zypp::target::TargetImpl::loadKindResolvables().

std::list< ResObject::Ptr > zypp::storage::PersistentStorage::storedObjects ( const Resolvable::Kind  kind  )  const

Query for installed Resolvables of a certain kind.

Definition at line 107 of file PersistentStorage.cc.

References d.

std::list< ResObject::Ptr > zypp::storage::PersistentStorage::storedObjects ( const Resolvable::Kind  kind,
const std::string &  name,
bool  partial_match = false 
) const

Query for installed Resolvables of a certain kind by name partial_match allows for text search.

Definition at line 115 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::setObjectFlag ( ResObject::constPtr  resolvable,
const std::string &  flag 
)

Set a flag for a resolvable.

Definition at line 125 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::removeObjectFlag ( ResObject::constPtr  resolvable,
const std::string &  flag 
)

Removes a flag for a resolvable.

Definition at line 129 of file PersistentStorage.cc.

References d.

std::set< std::string > zypp::storage::PersistentStorage::objectFlags ( ResObject::constPtr  resolvable  )  const

Returns a set of flags a resolvable has stored.

Definition at line 133 of file PersistentStorage.cc.

References d.

bool zypp::storage::PersistentStorage::doesObjectHasFlag ( ResObject::constPtr  resolvable,
const std::string &  flag 
) const

True if the resolvable has that flag.

Definition at line 137 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::setFlag ( const std::string &  key,
const std::string &  flag 
)

Definition at line 145 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::removeFlag ( const std::string &  key,
const std::string &  flag 
)

Definition at line 151 of file PersistentStorage.cc.

References d.

std::set< std::string > zypp::storage::PersistentStorage::flags ( const std::string &  key  )  const

Definition at line 157 of file PersistentStorage.cc.

References d.

bool zypp::storage::PersistentStorage::hasFlag ( const std::string &  key,
const std::string &  flag 
) const

Definition at line 163 of file PersistentStorage.cc.

References d.


Friends And Related Function Documentation

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

Stream output.

Definition at line 173 of file PersistentStorage.cc.


Member Data Documentation

shared_ptr<Private> zypp::storage::PersistentStorage::d [private]

Definition at line 117 of file PersistentStorage.h.

Referenced by deleteObject(), doesObjectHasFlag(), doTest(), flags(), hasFlag(), init(), isInitialized(), objectFlags(), removeFlag(), removeObjectFlag(), setFlag(), setObjectFlag(), storedObjects(), storeObject(), and timestamp().


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