#include <PersistentStorage.h>
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< Private > | d |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const PersistentStorage &obj) |
| Stream output. | |
Classes | |
| struct | Private |
Definition at line 36 of file PersistentStorage.h.
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.
| zypp::storage::PersistentStorage::PersistentStorage | ( | ) |
| zypp::storage::PersistentStorage::~PersistentStorage | ( | ) |
| void zypp::storage::PersistentStorage::doTest | ( | ) |
| 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 | |||
| ) |
| void zypp::storage::PersistentStorage::removeObjectFlag | ( | ResObject::constPtr | resolvable, | |
| const std::string & | flag | |||
| ) |
| 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 | |||
| ) |
| void zypp::storage::PersistentStorage::removeFlag | ( | const std::string & | key, | |
| const std::string & | flag | |||
| ) |
| std::set< std::string > zypp::storage::PersistentStorage::flags | ( | const std::string & | key | ) | const |
| bool zypp::storage::PersistentStorage::hasFlag | ( | const std::string & | key, | |
| const std::string & | flag | |||
| ) | const |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const PersistentStorage & | obj | |||
| ) | [friend] |
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().
1.5.3