9#ifndef ZYPP_SOLVER_DETAIL_SOLUTIONACTION_H
10#define ZYPP_SOLVER_DETAIL_SOLUTIONACTION_H
11#ifndef ZYPP_USE_RESOLVER_INTERNALS
12#error Do not directly include this file!
18#include <zypp/base/ReferenceCounted.h>
19#include <zypp/base/PtrTypes.h>
43 class SolutionAction :
public base::ReferenceCounted
49 virtual ~SolutionAction();
52 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
53 friend std::ostream&
operator<<(std::ostream &
str,
const SolutionAction & action)
54 {
return action.dumpOn (
str); }
55 friend std::ostream&
operator<<(std::ostream &
str,
const SolutionActionList & actionlist);
62 virtual bool execute (ResolverInternal & resolver)
const = 0;
79 REMOVE_EXTRA_CONFLICT,
81 REMOVE_SOLVE_QUEUE_ITEM,
85 class TransactionSolutionAction:
public SolutionAction
88 TransactionSolutionAction( PoolItem item,
89 TransactionKind action )
91 _item( item ), _action( action ) {}
93 TransactionSolutionAction( Capability capability,
94 TransactionKind action )
96 _capability( capability ), _action( action ) {}
99 TransactionSolutionAction( SolverQueueItem_Ptr item,
100 TransactionKind action )
102 _solverQueueItem( item ), _action( action ) {}
104 TransactionSolutionAction( TransactionKind action )
106 _item(), _action( action ) {}
109 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
110 friend std::ostream&
operator<<(std::ostream&
str,
const TransactionSolutionAction & action)
111 {
return action.dumpOn (
str); }
115 const PoolItem item()
const {
return _item; }
116 const Capability capability()
const {
return _capability; }
117 TransactionKind action()
const {
return _action; }
120 virtual bool execute(ResolverInternal & resolver)
const;
125 Capability _capability;
126 SolverQueueItem_Ptr _solverQueueItem;
128 const TransactionKind _action;
139 } InjectSolutionKind;
149 class InjectSolutionAction:
public SolutionAction
153 InjectSolutionAction( PoolItem item,
154 const InjectSolutionKind & kind)
160 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
161 friend std::ostream&
operator<<(std::ostream&
str,
const InjectSolutionAction & action)
162 {
return action.dumpOn (
str); }
165 const PoolItem item()
const {
return _item; }
168 virtual bool execute(ResolverInternal & resolver)
const;
172 const InjectSolutionKind _kind;
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
String related utilities and Regular expression matching.
Resolver ResolverInternal
Preferred name in API.
std::list< SolutionAction_Ptr > SolutionActionList
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.