11#ifndef ZYPP_SAT_TRANSACTION_H
12#define ZYPP_SAT_TRANSACTION_H
16#include <zypp/base/PtrTypes.h>
17#include <zypp/base/Flags.h>
18#include <zypp/base/Iterator.h>
19#include <zypp-core/base/DefaultIntegral>
37 class Transaction_iterator;
39 class Transaction_const_iterator;
99 explicit operator bool()
const
157 bool actionEmpty( StepStages filter_r = StepStages() )
const;
160 size_t actionSize( StepStages filter_r = StepStages() )
const;
205 {
return !( lhs == rhs ); }
294 , const detail::IdType *
296 , boost::forward_traversal_tag
322 Transaction_const_iterator
323 , const detail::IdType *
324 , const Transaction::Step
325 , boost::forward_traversal_tag
326 , const Transaction::Step
353 {
return( resolvable_r ?
find( resolvable_r->satSolvable() ) :
end() ); }
356 {
return( resolvable_r ?
find( resolvable_r->satSolvable() ) :
end() ); }
Edition represents [epoch:]version[-release]
Access to the sat-pools string space.
Combining sat::Solvable and ResStatus.
TraitsType::constPtrType constPtr
Libsolv Id queue wrapper.
Base class providing common iterator types based on a Solvable iterator.
A Solvable object within the sat Pool.
A single step within a Transaction.
Step(const RW_pointer< Impl > &pimpl_r, detail::IdType id_r)
StepType stepType() const
Type of action to perform in this step.
StepStage stepStage() const
Step action result.
friend std::ostream & operator<<(std::ostream &str, const Step &obj)
RW_pointer< Impl > _pimpl
Pointer to implementation.
Solvable satSolvable() const
Return the corresponding Solvable.
Libsolv transaction wrapper.
ZYPP_DECLARE_FLAGS(StepStages, StepStage)
size_t actionSize(StepStages filter_r=StepStages()) const
Number of steps in [filtered] transaction steps.
const_iterator end() const
Iterator behind the last TransactionStep.
bool actionEmpty(StepStages filter_r=StepStages()) const
Whether the [filtered] transaction contains any steps .
RW_pointer< Impl > _pimpl
Pointer to implementation.
bool operator!=(const Transaction &lhs, const Transaction &rhs)
int installedResult(Queue &result_r) const
Return all packages that would be installed after the transaction is run.
StringQueue autoInstalled() const
Return the ident strings of all packages that would be auto-installed after the transaction is run.
friend std::ostream & dumpOn(std::ostream &str, const Transaction &obj)
const_iterator begin() const
Iterator to the first TransactionStep.
bool valid() const
Whether transaction actually contains data and also fits the current pools content.
Transaction()
Default ctor: empty transaction.
Iterable< action_iterator > action(StepStages filter_r=StepStages()) const
Iterate the [filtered] transaction steps.
friend bool operator==(const Transaction &lhs, const Transaction &rhs)
filter_iterator< FilterAction, const_iterator > action_iterator
bool order()
Order transaction steps for commit.
friend std::ostream & operator<<(std::ostream &str, const Transaction &obj)
static constexpr LoadFromPoolType loadFromPool
detail::Transaction_const_iterator const_iterator
const_iterator find(const sat::Solvable &solv_r) const
Return iterator pointing to solv_r or end.
StepType
Type of (rpm) action to perform in a Step.
@ TRANSACTION_MULTIINSTALL
[M] Install(multiversion) item (
@ TRANSACTION_INSTALL
[+] Install(update) item
@ TRANSACTION_IGNORE
[ ] Nothing (includes implicit deletes due to obsoletes and non-package actions)
@ TRANSACTION_ERASE
[-] Delete item
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.
detail::Transaction_iterator iterator
size_t size() const
Number of steps in transaction steps.
StepStage
Step action result.
@ STEP_TODO
[__] unprocessed
bool empty() const
Whether the transaction contains any steps.
Transaction const_iterator.
Transaction_const_iterator(const RW_pointer< Transaction::Impl > &pimpl_r, base_type id_r)
reference dereference() const
Transaction_const_iterator()
RW_pointer< Transaction::Impl > _pimpl
Pointer to implementation.
friend class boost::iterator_core_access
reference dereference() const
RW_pointer< Transaction::Impl > _pimpl
Pointer to implementation.
Transaction_iterator(const RW_pointer< Transaction::Impl > &pimpl_r, base_type id_r)
friend class boost::iterator_core_access
String related utilities and Regular expression matching.
int IdType
Generic Id type.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
bool operator==(const Map &lhs, const Map &rhs)
Easy-to use interface to the ZYPP dependency resolver.
filter_iterator< TFilter, typename TContainer::const_iterator > make_filter_begin(TFilter f, const TContainer &c)
Convenience to create filter_iterator from container::begin().
filter_iterator< TFilter, typename TContainer::const_iterator > make_filter_end(TFilter f, const TContainer &c)
Convenience to create filter_iterator from container::end().
Wrapper for const correct access via Smart pointer types.
Solvable satSolvable() const
Return the corresponding sat::Solvable.
bool operator()(const Transaction::Step &step_r) const
FilterAction(StepStages filter_r)
Transaction implementation.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
#define ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)