CPoolItemSet _installed;
/** adjacency list type */
- typedef std::map<const PoolItem *, CPoolItemSet> Graph;
+ typedef std::map<const PoolItem , CPoolItemSet> Graph;
/** adjacency list, package -> requirements */
Graph _graph;
bool visited;
int order; // number of incoming edges in reverse graph
- const PoolItem *item;
+ const PoolItem item;
NodeInfo() : begintime(0), endtime(0), visited(false), order(0) {}
- NodeInfo(const PoolItem *item) : begintime(0), endtime(0), visited(false), order(0), item(item) {}
+ NodeInfo(const PoolItem item) : begintime(0), endtime(0), visited(false), order(0), item(item) {}
};
- typedef std::map<const PoolItem *,NodeInfo> Nodes;
+ typedef std::map<const PoolItem ,NodeInfo> Nodes;
Nodes _nodes;
unsigned _numrun;
private:
- void rdfsvisit (const PoolItem *item);
+ void rdfsvisit (const PoolItem item);
public:
* set a Solvable as installed, computeNextSet is able to compute a new
* set then
* */
- void setInstalled( const PoolItem *item );
+ void setInstalled( const PoolItem item );
/**
* like above, for convenience
**/
ProblemSolutionIgnore( ResolverProblem_Ptr parent,
const Dep &dep,
- PoolItem *item,
+ PoolItem item,
const Capability & capability);
};
/**
* Constructor.
**/
- ProblemSolutionInstall( ResolverProblem_Ptr parent, PoolItem *item);
+ ProblemSolutionInstall( ResolverProblem_Ptr parent, PoolItem item);
ProblemSolutionInstall( ResolverProblem_Ptr parent, PoolItemList & itemlist );
};
/**
* Constructor.
**/
- ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem *item);
+ ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItem item);
ProblemSolutionUninstall( ResolverProblem_Ptr parent, PoolItemList & itemlist);
};
private:
const Capability & _capability; // the conflicting capability
- PoolItem *_conflicting_item; // the item which issued the conflict
+ PoolItem _conflicting_item; // the item which issued the conflict
bool _actually_an_obsolete;
public:
- QueueItemConflict (const ResPool *pool, const Capability & capability, PoolItem *item);
+ QueueItemConflict (const ResPool *pool, const Capability & capability, PoolItem item);
virtual ~QueueItemConflict();
// ---------------------------------- I/O
class QueueItemEstablish : public QueueItem {
private:
- PoolItem *_item;
+ PoolItem _item;
int _channel_priority;
int _other_penalty;
public:
- QueueItemEstablish (const ResPool *pool, PoolItem *item);
+ QueueItemEstablish (const ResPool *pool, PoolItem item);
virtual ~QueueItemEstablish();
// ---------------------------------- I/O
// ---------------------------------- accessors
- PoolItem *item (void) const { return _item; }
+ PoolItem item (void) const { return _item; }
int channelPriority (void) const { return _channel_priority; }
void setChannelPriority (int channel_priority) { _channel_priority = channel_priority; }
private:
- PoolItem *_item; // the item to-be-installed
- PoolItem *_upgrades; // the item this install upgrades (if any)
+ PoolItem _item; // the item to-be-installed
+ PoolItem _upgrades; // the item this install upgrades (if any)
CapSet _deps_satisfied_by_this_install;
CPoolItemList _needed_by;
int _channel_priority;
public:
- QueueItemInstall (const ResPool *pool, PoolItem *item);
+ QueueItemInstall (const ResPool *pool, PoolItem item);
virtual ~QueueItemInstall();
// ---------------------------------- I/O
// ---------------------------------- accessors
- PoolItem *item(void) const { return _item; }
+ PoolItem item(void) const { return _item; }
- PoolItem *upgrades (void) const { return _upgrades; }
- void setUpgrades (PoolItem *upgrades) { _upgrades = upgrades; }
+ PoolItem upgrades (void) const { return _upgrades; }
+ void setUpgrades (PoolItem upgrades) { _upgrades = upgrades; }
int channelPriority (void) const { return _channel_priority; }
void setChannelPriority (int channel_priority) { _channel_priority = channel_priority; }
virtual bool isSatisfied (ResolverContext_Ptr context) const;
void addDependency (const Capability & capability);
- void addNeededBy (const PoolItem *item);
+ void addNeededBy (const PoolItem item);
};
private:
const Capability _capability; // the required capability
- PoolItem *_requiring_item; // who's requiring it
+ PoolItem _requiring_item; // who's requiring it
- PoolItem *_upgraded_item;
- PoolItem *_lost_item;
+ PoolItem _upgraded_item;
+ PoolItem _lost_item;
bool _remove_only;
bool _is_child;
const Capability & capability (void) const { return _capability; }
void setRemoveOnly (void) { _remove_only = true; }
- void setUpgradedPoolItem (PoolItem *upgraded_item) { _upgraded_item = upgraded_item; }
- void setLostPoolItem (PoolItem *lost_item) { _lost_item = lost_item; }
+ void setUpgradedPoolItem (PoolItem upgraded_item) { _upgraded_item = upgraded_item; }
+ void setLostPoolItem (PoolItem lost_item) { _lost_item = lost_item; }
// ---------------------------------- methods
virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
virtual bool isSatisfied (ResolverContext_Ptr context) const { return false; }
- void addPoolItem (PoolItem * item);
+ void addPoolItem (PoolItem item);
};
private:
- PoolItem *_item; // the item to-be-uninstalled
+ PoolItem _item; // the item to-be-uninstalled
UninstallReason _reason;
Capability _cap_leading_to_uninstall;
- PoolItem *_upgraded_to; // if the uninstall is actually an upgrade
+ PoolItem _upgraded_to; // if the uninstall is actually an upgrade
bool _explicitly_requested;
bool _remove_only;
public:
- QueueItemUninstall (const ResPool *pool, PoolItem *item, UninstallReason reason);
+ QueueItemUninstall (const ResPool *pool, PoolItem item, UninstallReason reason);
virtual ~QueueItemUninstall();
// ---------------------------------- I/O
void setDependency (const Capability & cap) { _cap_leading_to_uninstall = cap; }
void setExplicitlyRequested (void) { _explicitly_requested = true; }
void setRemoveOnly (void) { _remove_only = true; }
- void setUpgradedTo (PoolItem *item) { _upgraded_to = item; }
+ void setUpgradedTo (PoolItem item) { _upgraded_to = item; }
void setDueToConflict (void) { _due_to_conflict = true; }
void setDueToObsolete (void) { _due_to_obsolete = true; }
void setUnlink (void);
// void setCurrentChannel (Channel_constPtr channel) { _current_channel = channel; }
// void addSubscribedChannel (Channel_constPtr channel);
- void addPoolItemToInstall (PoolItem *item);
+ void addPoolItemToInstall (PoolItem item);
void addPoolItemsToInstallFromList (CPoolItemList & rl);
- void addPoolItemToRemove (PoolItem *item);
+ void addPoolItemToRemove (PoolItem item);
void addPoolItemsToRemoveFromList (CPoolItemList & rl);
- void addPoolItemToEstablish (PoolItem *item);
+ void addPoolItemToEstablish (PoolItem item);
void addPoolItemsToEstablishFromList (CPoolItemList & rl);
- void addPoolItemToVerify (PoolItem *item);
+ void addPoolItemToVerify (PoolItem item);
void addExtraCapability (const Capability & capability);
void addExtraConflict (const Capability & capability);
{ ///////////////////////////////////////////////////////////////////
typedef void (*ResolverContextFn) (ResolverContext_Ptr ctx, void *data);
-typedef void (*MarkedPoolItemFn) (PoolItem *item, void *data);
-typedef void (*MarkedPoolItemPairFn) (PoolItem *item1, PoolItem *item2, void *data);
+typedef void (*MarkedPoolItemFn) (PoolItem item, void *data);
+typedef void (*MarkedPoolItemPairFn) (PoolItem item1, PoolItem item2, void *data);
///////////////////////////////////////////////////////////////////
ResolverContext_Ptr _parent; // branches share a common parent
- typedef std::set<PoolItem *> Context;
+ typedef std::set<PoolItem > Context;
Context _context; // the set of items touched in this transaction
ResolverInfoList _log; // report log
*set the state of \c item to \c status
*If \c status is not the current state of \c item, make \c item
*part of the current transaction (the context) */
- void setStatus (PoolItem *item, ResStatus & status);
+ void setStatus (PoolItem item, ResStatus & status);
/**
*set \c item to \a to-be-installed */
- bool install (PoolItem *item, bool is_soft, int other_penalty);
+ bool install (PoolItem item, bool is_soft, int other_penalty);
/**
*set \c item to \a satisfied */
- bool satisfy (PoolItem *item, int other_penalty);
+ bool satisfy (PoolItem item, int other_penalty);
/**
*set \c item to \a unneeded */
- bool unneeded (PoolItem *item, int other_penalty);
+ bool unneeded (PoolItem item, int other_penalty);
/**
*set \c item to \a incomplete */
- bool incomplete (PoolItem *item, int other_penalty);
+ bool incomplete (PoolItem item, int other_penalty);
/**
*upgrade \c from to \c to
*marks \c from as \a to-be-uninstalled and \c to as \a to-be-installed */
- bool upgrade (PoolItem *to, PoolItem *from, bool is_soft, int other_penalty);
+ bool upgrade (PoolItem to, PoolItem from, bool is_soft, int other_penalty);
/**
*set \c item to \a to-be-uninstalled */
- bool uninstall (PoolItem *item, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink);
+ bool uninstall (PoolItem item, bool part_of_upgrade, bool due_to_obsolete, bool due_to_unlink);
// rough installed/uninstalled test for 'after transaction'
/**
*\return \c true if \c item is \a installed or \a to-be-installed */
- bool isPresent (PoolItem *item);
+ bool isPresent (PoolItem item);
/**
*\return \c true if \c item is \a uninstalled or \a to-be-uninstalled */
- bool isAbsent (PoolItem *item);
+ bool isAbsent (PoolItem item);
bool requirementIsMet (const Capability & cap, bool is_child = false);
bool requirementIsPossible (const Capability & cap);
void addError (ResolverInfo_Ptr info); // error progress info
// iterate over report log
- void foreachInfo (PoolItem *item, int priority, ResolverInfoFn fn, void *data);
+ void foreachInfo (PoolItem item, int priority, ResolverInfoFn fn, void *data);
ResolverInfoList getInfo (void);
// Context compare to identify equal branches
ResolverInfoType _type;
- PoolItem *_affected;
+ PoolItem _affected;
int _priority;
protected:
- ResolverInfo (ResolverInfoType type, PoolItem *affected, int priority);
+ ResolverInfo (ResolverInfoType type, PoolItem affected, int priority);
public:
// ---------------------------------- accessors
ResolverInfoType type (void) const { return _type; }
- PoolItem *affected (void) const { return _affected; }
+ PoolItem affected (void) const { return _affected; }
int priority (void) const { return _priority; }
int error (void) const { return _error; }
public:
- ResolverInfoChildOf (PoolItem *item, PoolItem *dependency);
+ ResolverInfoChildOf (PoolItem item, PoolItem dependency);
virtual ~ResolverInfoChildOf();
// ---------------------------------- I/O
public:
- ResolverInfoConflictsWith (PoolItem *resItem, PoolItem *with);
+ ResolverInfoConflictsWith (PoolItem resItem, PoolItem with);
virtual ~ResolverInfoConflictsWith();
// ---------------------------------- I/O
protected:
- ResolverInfoContainer (ResolverInfoType type, PoolItem *initial_item, int priority, PoolItem *child = NULL);
+ ResolverInfoContainer (ResolverInfoType type, PoolItem initial_item, int priority, PoolItem child = NULL);
public:
virtual ~ResolverInfoContainer();
std::string itemsToString (const bool names_only,
const bool shorten_output = false) const;
- bool mentions (PoolItem *item) const;
- void addRelatedPoolItem (PoolItem *item);
+ bool mentions (PoolItem item) const;
+ void addRelatedPoolItem (PoolItem item);
void addRelatedPoolItemList (const CPoolItemList & items);
};
public:
- ResolverInfoDependsOn (PoolItem *item, PoolItem *on);
+ ResolverInfoDependsOn (PoolItem item, PoolItem on);
virtual ~ResolverInfoDependsOn();
// ---------------------------------- I/O
Capability _capability; // capability leading to this info
- PoolItem *_other_item;
+ PoolItem _other_item;
Capability _other_capability;
std::string _action;
public:
- ResolverInfoMisc (ResolverInfoType detailedtype, PoolItem *affected, int priority, const Capability & capability = Capability());
+ ResolverInfoMisc (ResolverInfoType detailedtype, PoolItem affected, int priority, const Capability & capability = Capability());
virtual ~ResolverInfoMisc();
// ---------------------------------- I/O
std::string action (void) const { return _action; }
std::string trigger (void) const { return _trigger; }
- PoolItem *other (void) const { return _other_item; }
+ PoolItem other (void) const { return _other_item; }
const Capability other_capability (void) const { return _other_capability; }
const Capability capability(void) const { return _capability; }
void addAction (const std::string & action_msg);
void addTrigger (const std::string & trigger_msg);
- void setOtherPoolItem (PoolItem *other);
+ void setOtherPoolItem (PoolItem other);
void setOtherCapability (const Capability & capability);
};
public:
- ResolverInfoMissingReq (PoolItem *item, const Capability & missing_req);
+ ResolverInfoMissingReq (PoolItem item, const Capability & missing_req);
virtual ~ResolverInfoMissingReq();
// ---------------------------------- I/O
public:
- ResolverInfoNeededBy (PoolItem *item);
+ ResolverInfoNeededBy (PoolItem item);
virtual ~ResolverInfoNeededBy();
// ---------------------------------- I/O
public:
- ResolverInfoObsoletes (PoolItem *resItem, PoolItem *obsoletes);
+ ResolverInfoObsoletes (PoolItem resItem, PoolItem obsoletes);
virtual ~ResolverInfoObsoletes();
// ---------------------------------- I/O
// ---------------------------------- methods
- void addPoolItemToInstall (PoolItem *item);
- void addPoolItemToEstablish (PoolItem *item);
- void addPoolItemToRemove (PoolItem *item, bool remove_only_mode);
- void addPoolItemToVerify (PoolItem *item);
+ void addPoolItemToInstall (PoolItem item);
+ void addPoolItemToEstablish (PoolItem item);
+ void addPoolItemToRemove (PoolItem item, bool remove_only_mode);
+ void addPoolItemToVerify (PoolItem item);
void addExtraDependency (const Capability & cap);
void addExtraConflict (const Capability & cap);
void addItem (QueueItem_Ptr item);
class TransactionSolutionAction: public SolutionAction
{
public:
- TransactionSolutionAction( PoolItem *item,
+ TransactionSolutionAction( PoolItem item,
TransactionKind action )
: SolutionAction(), _item( item ), _action( action ) {}
// ---------------------------------- accessors
- PoolItem *item() const { return _item; }
+ PoolItem item() const { return _item; }
TransactionKind action() const { return _action; }
// ---------------------------------- methods
protected:
- PoolItem *_item;
+ PoolItem _item;
TransactionKind _action;
};
#include "zypp/PoolItem.h"
-typedef std::list <zypp::PoolItem *> PoolItemList;
-typedef std::list <const zypp::PoolItem *> CPoolItemList;
-typedef std::set <const zypp::PoolItem *> CPoolItemSet;
+typedef std::list <zypp::PoolItem> PoolItemList;
+typedef std::list <const zypp::PoolItem> CPoolItemList;
+typedef std::set <const zypp::PoolItem> CPoolItemSet;
#define item_status_is_to_be_uninstalled(x) true