zypp::storage::PersistentStorage Class Reference

#include <PersistentStorage.h>

Inheritance diagram for zypp::storage::PersistentStorage:

zypp::base::ReferenceCounted NonCopyable 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
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::PtrstoredObjects () const
 Query for installed Resolvables.
std::list< ResObject::PtrstoredObjects (const Resolvable::Kind kind) const
 Query for installed Resolvables of a certain kind.
std::list< ResObject::PtrstoredObjects (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
std::list< SourceDatastoredSources () const
 Query for installed Sources.
void storeSource (const SourceData &data)
 Add a new installed source.
void deleteSource (const std::string &alias)
 Delete an installed source.

Private Types

typedef intrusive_ptr< PersistentStoragePtr
typedef intrusive_ptr< const
PersistentStorage
constPtr

Private Attributes

shared_ptr< Privated

Friends

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

Classes

struct  Private
struct  SourceData

Detailed Description

Definition at line 35 of file PersistentStorage.h.


Member Typedef Documentation

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

Definition at line 38 of file PersistentStorage.h.

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

Definition at line 39 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.

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

Stores a Resolvable in the active backend.

Definition at line 83 of file PersistentStorage.cc.

References d.

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

Deletes a Resolvable from the active backend.

Definition at line 89 of file PersistentStorage.cc.

References d.

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

Query for installed Resolvables.

Definition at line 95 of file PersistentStorage.cc.

References d.

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

Query for installed Resolvables of a certain kind.

Definition at line 101 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 109 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 119 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 123 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 127 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 131 of file PersistentStorage.cc.

References d.

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

Definition at line 139 of file PersistentStorage.cc.

References d.

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

Definition at line 145 of file PersistentStorage.cc.

References d.

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

Definition at line 151 of file PersistentStorage.cc.

References d.

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

Definition at line 157 of file PersistentStorage.cc.

References d.

std::list< PersistentStorage::SourceData > zypp::storage::PersistentStorage::storedSources  )  const
 

Query for installed Sources.

Definition at line 167 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::storeSource const SourceData data  ) 
 

Add a new installed source.

Definition at line 173 of file PersistentStorage.cc.

References d.

void zypp::storage::PersistentStorage::deleteSource const std::string &  alias  ) 
 

Delete an installed source.

Definition at line 179 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 189 of file PersistentStorage.cc.


Member Data Documentation

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

Definition at line 144 of file PersistentStorage.h.

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


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