15 #ifndef ZYPP_SAT_TRANSACTION_H
16 #define ZYPP_SAT_TRANSACTION_H
40 class Transaction_iterator;
42 class Transaction_const_iterator;
102 explicit operator bool()
const
122 const_iterator
begin()
const;
127 const_iterator
end()
const;
160 bool actionEmpty( StepStages filter_r = StepStages() )
const;
163 size_t actionSize( StepStages filter_r = StepStages() )
const;
166 action_iterator
actionBegin( StepStages filter_r = StepStages() )
const;
194 {
return !( lhs == rhs ); }
209 friend std::ostream &
operator<<( std::ostream & str,
const Step & obj );
256 operator const Solvable &()
const {
return _solv; }
283 , const detail::IdType *
285 , boost::forward_traversal_tag
297 friend class boost::iterator_core_access;
311 Transaction_const_iterator
312 , const detail::IdType *
313 , const Transaction::Step
314 , boost::forward_traversal_tag
315 , const Transaction::Step
327 friend class boost::iterator_core_access;
342 {
return( resolvable_r ?
find( resolvable_r->satSolvable() ) :
end() ); }
345 {
return( resolvable_r ?
find( resolvable_r->satSolvable() ) :
end() ); }
363 return !_filter || _filter.testFlag( step_r.
stepStage() );
392 #endif // ZYPP_SAT_TRANSACTION_H
int IdType
Generic Id type.
A Solvable object within the sat Pool.
friend bool operator==(const Transaction &lhs, const Transaction &rhs)
Transaction const_iterator.
[M] Install(multiversion) item (
ZYPP_DECLARE_FLAGS(StepStages, StepStage)
RW_pointer< Impl > _pimpl
Pointer to implementation.
friend std::ostream & dumpOn(std::ostream &str, const Transaction &obj)
size_t actionSize(StepStages filter_r=StepStages()) const
Number of steps in [filtered] transaction steps.
RW_pointer< Transaction::Impl > _pimpl
Pointer to implementation.
const_iterator find(const sat::Solvable &solv_r) const
Return iterator pointing to solv_r or end.
StepStage
Step action result.
Transaction()
Default ctor: empty transaction.
Access to the sat-pools string space.
Libsolv transaction wrapper.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Edition represents [epoch:]version[-release]
filter_iterator< _Filter, typename _Container::const_iterator > make_filter_begin(_Filter f, const _Container &c)
Convenience to create filter_iterator from container::begin().
TraitsType::constPtrType constPtr
Transaction_const_iterator(const RW_pointer< Transaction::Impl > &pimpl_r, base_type id_r)
reference dereference() const
Step(const RW_pointer< Impl > &pimpl_r, detail::IdType id_r)
const_iterator begin() const
Iterator to the first TransactionStep.
StepStage stepStage() const
Step action result.
[ ] Nothing (includes implicit deletes due to obsoletes and non-package actions)
Base class providing common iterator types based on a Solvable iterator.
StepType stepType() const
Type of action to perform in this step.
filter_iterator< FilterAction, const_iterator > action_iterator
Transaction_iterator(const RW_pointer< Transaction::Impl > &pimpl_r, base_type id_r)
RW_pointer< Impl > _pimpl
Pointer to implementation.
friend std::ostream & operator<<(std::ostream &str, const Transaction &obj)
bool actionEmpty(StepStages filter_r=StepStages()) const
Whether the [filtered] transaction contains any steps .
A single step within a Transaction.
reference dereference() const
detail::Transaction_const_iterator const_iterator
Transaction implementation.
bool order()
Order transaction steps for commit.
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Transaction::StepStages)
bool valid() const
Whether transaction actually contains data and also fits the current pools content.
action_iterator actionEnd() const
Pointer behind the last action step in transaction.
Solvable satSolvable() const
Return the corresponding Solvable.
StepType
Type of (rpm) action to perform in a Step.
size_t size() const
Number of steps in transaction steps.
action_iterator actionBegin(StepStages filter_r=StepStages()) const
Pointer to the 1st action step in [filtered] transaction.
static constexpr LoadFromPoolType loadFromPool
bool empty() const
Whether the transaction contains any steps.
const_iterator end() const
Iterator behind the last TransactionStep.
Wrapper for const correct access via Smart pointer types.
sat::Solvable satSolvable() const
Return the corresponding sat::Solvable.
filter_iterator< _Filter, typename _Container::const_iterator > make_filter_end(_Filter f, const _Container &c)
Convenience to create filter_iterator from container::end().
FilterAction(StepStages filter_r)
Reference to a PoolItem connecting ResObject and ResStatus.
bool operator()(const Transaction::Step &step_r) const
RW_pointer< Transaction::Impl > _pimpl
Pointer to implementation.
detail::Transaction_iterator iterator
bool operator!=(const Transaction &lhs, const Transaction &rhs)