libzypp
10.5.0
|
Libsolv transaction wrapper. More...
#include <Transaction.h>
Classes | |
struct | FilterAction |
struct | Impl |
Transaction implementation. More... | |
class | Step |
A single step within a Transaction. More... | |
Public Types | |
enum | StepType { TRANSACTION_IGNORE = 0x00, TRANSACTION_ERASE = 0x10, TRANSACTION_INSTALL = 0x20, TRANSACTION_MULTIINSTALL = 0x30 } |
Type of (rpm) action to perform in a Step. More... | |
enum | StepStage { STEP_TODO = (1 << 0), STEP_DONE = (1 << 1), STEP_ERROR = (1 << 2) } |
Step action result. More... | |
typedef detail::Transaction_iterator | iterator |
typedef detail::Transaction_const_iterator | const_iterator |
Public Member Functions | |
ZYPP_DECLARE_FLAGS (StepStages, StepStage) | |
Transaction () | |
Default ctor: empty transaction. | |
Transaction (::_Transaction &trans_r) | |
Ctor cloning a sat transaction. | |
~Transaction () | |
Dtor. | |
bool | valid () const |
Whether transaction actually contains data and also fits the current pools content. | |
bool | order () |
Order transaction steps for commit. | |
bool | empty () const |
Whether the transaction contains any steps. | |
size_t | size () const |
Number of steps in transaction steps. | |
const_iterator | begin () const |
Iterator to the first TransactionStep. | |
iterator | begin () |
const_iterator | end () const |
Iterator behind the last TransactionStep. | |
iterator | end () |
const_iterator | find (const sat::Solvable &solv_r) const |
Return iterator pointing to solv_r or end. | |
iterator | find (const sat::Solvable &solv_r) |
const_iterator | find (const ResObject::constPtr &resolvable_r) const |
iterator | find (const ResObject::constPtr &resolvable_r) |
const_iterator | find (const PoolItem &pi_r) const |
iterator | find (const PoolItem &pi_r) |
Private Member Functions | |
friend | base::SafeBool () const |
bool | boolTest () const |
Validate object in a boolean context. | |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const Transaction &obj) |
std::ostream & | dumpOn (std::ostream &str, const Transaction &obj) |
bool | operator== (const Transaction &lhs, const Transaction &rhs) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Transaction &obj) |
std::ostream & | dumpOn (std::ostream &str, const Transaction &obj) |
bool | operator== (const Transaction &lhs, const Transaction &rhs) |
bool | operator!= (const Transaction &lhs, const Transaction &rhs) |
Iterate action steps (omit TRANSACTION_IGNORE steps). | |
All these methods allow to pass an optional OR'd combination of StepStages as filter. Per default all steps are processed/counted. Transaction trans; for_( it, trans.actionBegin(~sat::Transaction::STEP_DONE), trans.actionEnd() ) { ... // process all steps not DONE (ERROR and TODO) } | |
typedef filter_iterator < FilterAction, const_iterator > | action_iterator |
bool | actionEmpty (StepStages filter_r=StepStages()) const |
Whether the [filtered] transaction contains any steps . | |
size_t | actionSize (StepStages filter_r=StepStages()) const |
Number of steps in [filtered] transaction steps. | |
action_iterator | actionBegin (StepStages filter_r=StepStages()) const |
Pointer to the 1st action step in [filtered] transaction. | |
action_iterator | actionEnd () const |
Pointer behind the last action step in transaction. |
Libsolv transaction wrapper.
Definition at line 55 of file Transaction.h.
Definition at line 115 of file Transaction.h.
Definition at line 116 of file Transaction.h.
typedef filter_iterator<FilterAction,const_iterator> zypp::sat::Transaction::action_iterator |
Definition at line 153 of file Transaction.h.
Type of (rpm) action to perform in a Step.
Definition at line 67 of file Transaction.h.
Step action result.
Definition at line 76 of file Transaction.h.
zypp::sat::Transaction::Transaction | ( | ) |
Default ctor: empty transaction.
Definition at line 294 of file Transaction.cc.
zypp::sat::Transaction::Transaction | ( | ::_Transaction & | trans_r | ) |
Ctor cloning a sat transaction.
Definition at line 298 of file Transaction.cc.
zypp::sat::Transaction::~Transaction | ( | ) |
Dtor.
Definition at line 302 of file Transaction.cc.
zypp::sat::Transaction::ZYPP_DECLARE_FLAGS | ( | StepStages | , |
StepStage | |||
) |
bool zypp::sat::Transaction::valid | ( | ) | const |
Whether transaction actually contains data and also fits the current pools content.
Definition at line 305 of file Transaction.cc.
bool zypp::sat::Transaction::order | ( | ) |
Order transaction steps for commit.
It's cheap to call it for an aleready ordered Transaction. This invalidates outstanding iterators. Returns whether Transaction is valid.
Definition at line 308 of file Transaction.cc.
bool zypp::sat::Transaction::empty | ( | ) | const |
Whether the transaction contains any steps.
Reimplemented from zypp::sat::SolvIterMixin< Transaction, detail::Transaction_const_iterator >.
Definition at line 311 of file Transaction.cc.
size_t zypp::sat::Transaction::size | ( | ) | const |
Number of steps in transaction steps.
Reimplemented from zypp::sat::SolvIterMixin< Transaction, detail::Transaction_const_iterator >.
Definition at line 314 of file Transaction.cc.
Transaction::const_iterator zypp::sat::Transaction::begin | ( | ) | const |
Iterator to the first TransactionStep.
Definition at line 317 of file Transaction.cc.
Transaction::iterator zypp::sat::Transaction::begin | ( | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 320 of file Transaction.cc.
Transaction::const_iterator zypp::sat::Transaction::end | ( | ) | const |
Iterator behind the last TransactionStep.
Definition at line 323 of file Transaction.cc.
Transaction::iterator zypp::sat::Transaction::end | ( | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 326 of file Transaction.cc.
Transaction::const_iterator zypp::sat::Transaction::find | ( | const sat::Solvable & | solv_r | ) | const |
Return iterator pointing to solv_r or end.
Definition at line 329 of file Transaction.cc.
Transaction::iterator zypp::sat::Transaction::find | ( | const sat::Solvable & | solv_r | ) |
Definition at line 332 of file Transaction.cc.
Transaction::const_iterator zypp::sat::Transaction::find | ( | const ResObject::constPtr & | resolvable_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 343 of file Transaction.h.
Transaction::iterator zypp::sat::Transaction::find | ( | const ResObject::constPtr & | resolvable_r | ) | [inline] |
Definition at line 346 of file Transaction.h.
Transaction::const_iterator zypp::sat::Transaction::find | ( | const PoolItem & | pi_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 349 of file Transaction.h.
Transaction::iterator zypp::sat::Transaction::find | ( | const PoolItem & | pi_r | ) | [inline] |
Definition at line 352 of file Transaction.h.
bool zypp::sat::Transaction::actionEmpty | ( | StepStages | filter_r = StepStages() | ) | const [inline] |
Whether the [filtered] transaction contains any steps .
Definition at line 377 of file Transaction.h.
size_t zypp::sat::Transaction::actionSize | ( | StepStages | filter_r = StepStages() | ) | const [inline] |
Number of steps in [filtered] transaction steps.
Definition at line 380 of file Transaction.h.
Transaction::action_iterator zypp::sat::Transaction::actionBegin | ( | StepStages | filter_r = StepStages() | ) | const [inline] |
Pointer to the 1st action step in [filtered] transaction.
Definition at line 371 of file Transaction.h.
Transaction::action_iterator zypp::sat::Transaction::actionEnd | ( | ) | const [inline] |
Pointer behind the last action step in transaction.
Definition at line 374 of file Transaction.h.
zypp::sat::Transaction::base::SafeBool | ( | ) | const [private] |
bool zypp::sat::Transaction::boolTest | ( | ) | const [inline, private] |
Validate object in a boolean context.
Definition at line 173 of file Transaction.h.
std::ostream& operator<< | ( | std::ostream & | str, |
const Transaction & | obj | ||
) | [friend] |
Definition at line 335 of file Transaction.cc.
std::ostream& dumpOn | ( | std::ostream & | str, |
const Transaction & | obj | ||
) | [friend] |
Definition at line 338 of file Transaction.cc.
bool operator== | ( | const Transaction & | lhs, |
const Transaction & | rhs | ||
) | [friend] |
Definition at line 347 of file Transaction.cc.
std::ostream & operator<< | ( | std::ostream & | str, |
const Transaction & | obj | ||
) | [related] |
Stream output
Definition at line 335 of file Transaction.cc.
ostream & zypp::target::rpm::RpmDb::dumpOn | ( | std::ostream & | str, |
const Transaction & | obj | ||
) | [related] |
Verbose stream output
Definition at line 338 of file Transaction.cc.
bool operator== | ( | const Transaction & | lhs, |
const Transaction & | rhs | ||
) | [related] |
Definition at line 347 of file Transaction.cc.
bool operator!= | ( | const Transaction & | lhs, |
const Transaction & | rhs | ||
) | [related] |
Definition at line 195 of file Transaction.h.
RW_pointer<Impl> zypp::sat::Transaction::_pimpl [private] |
Pointer to implementation.
Definition at line 177 of file Transaction.h.