21#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEM_H
22#define ZYPP_SOLVER_DETAIL_QUEUEITEM_H
23#ifndef ZYPP_USE_RESOLVER_INTERNALS
24#error Do not directly include this file!
31#include <zypp/base/ReferenceCounted.h>
32#include <zypp/base/NonCopyable.h>
33#include <zypp/base/PtrTypes.h>
56 QUEUE_ITEM_TYPE_UNKNOWN = 0,
57 QUEUE_ITEM_TYPE_UPDATE,
58 QUEUE_ITEM_TYPE_INSTALL,
59 QUEUE_ITEM_TYPE_DELETE,
60 QUEUE_ITEM_TYPE_INSTALL_ONE_OF,
67#define CMP(a,b) (((a) < (b)) - ((b) < (a)))
77 SolverQueueItemType _type;
90 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
93 {
return obj.dumpOn (
str); }
94 friend std::ostream&
operator<<(std::ostream &
str,
const SolverQueueItemList & itemlist);
98 ResPool pool (
void)
const {
return _pool; }
104 bool isDelete (
void)
const {
return _type == QUEUE_ITEM_TYPE_DELETE; }
105 bool isInstall (
void)
const {
return _type == QUEUE_ITEM_TYPE_INSTALL; }
106 bool isUpdate (
void)
const {
return _type == QUEUE_ITEM_TYPE_UPDATE; }
107 bool isLock (
void)
const {
return _type == QUEUE_ITEM_TYPE_LOCK; }
108 bool isInstallOneOf (
void)
const {
return _type == QUEUE_ITEM_TYPE_INSTALL_ONE_OF; }
111 virtual SolverQueueItem_Ptr
copy (
void)
const = 0;
112 virtual bool addRule (sat::detail::CQueue & q) =0 ;
113 virtual int cmp (SolverQueueItem_constPtr item)
const = 0;
114 int compare (SolverQueueItem_constPtr item)
const {
return CMP(_type, item->_type); }
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::ostream & copy(std::istream &from_r, std::ostream &to_r)
Copy istream to ostream.
std::list< SolverQueueItem_Ptr > SolverQueueItemList
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.