Boyd Timothy schrieb:
On Dec 6, 2007 3:54 AM, Stefan Schubert
wrote: Duncan Mac-Vicar Prett schrieb: const solver::detail::ItemCapKindList isInstalledBy (const PoolItem_Ref item);
const solver::detail::ItemCapKindList installs (const PoolItem_Ref item);
Been trying to figure out how to call this. Right now in my code, I iterate through the pool looking for the main package, mark it to be installed, run the solver, and now I'm to the point where I'd call installs(). Where do I get a PoolItem_Ref?
Sample code here: http://pastebin.com/f78dc52da
Line 98 is where I'm stumped. installs() takes a PoolItem_Ref, but where do I get one of those? Line #65 doesn't compile either, for what it's worth.
-Boyd
It is defined in the return value:
/**
* Gives information about WHICH additional items will be installed
due the installation of an item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
* item Item which will be installed due to the
installation of the given param item too.
* cap Capability which causes the installation
* capKind Kind of that capability (e.g.
Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not
matter if it is valid or invalid.
*
*/
const solver::detail::ItemCapKindList installs (const PoolItem_Ref
item);
The class ItemCapKindList is defined solver/details/Resolver.h:
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : ItemCapKind
//
/** */
struct ItemCapKind
{
public:
Capability cap; //Capability which has triggerd this selection
Dep capKind; //Kind of that capability
PoolItem_Ref item; //Item which has triggered this selection
bool initialInstallation; //This item has triggered the installation
//Not already fullfilled requierement only.
ItemCapKind() : capKind("FRESHENS") {}
ItemCapKind( PoolItem i, Capability c, Dep k, bool initial)
: cap( c )
, capKind( k )
, item( i )
, initialInstallation( initial )
{ }
};
typedef std::multimap