Cupt
|
dependency problems resolver More...
#include <cupt/system/resolver.hpp>
Classes | |
struct | AutoRemovalReason |
reason: auto-removal More... | |
struct | ImplicitReason |
reason: implicitly changed by resolver More... | |
struct | Offer |
the result of resolver's work More... | |
struct | Reason |
base class for resolver decision reasons More... | |
struct | RelationExpressionReason |
reason: other version's dependency More... | |
struct | RequestImportance |
struct | SuggestedPackage |
resolver's main solution item More... | |
struct | SynchronizationReason |
reason: source-synchronized with a related binary package More... | |
struct | UserAnswer |
user callback answer variants More... | |
struct | UserReason |
reason: asked by user More... | |
Public Types | |
typedef map< string, SuggestedPackage > | SuggestedPackages |
typedef std::function< UserAnswer::Type(const Offer &) > | CallbackType |
callback function type | |
Public Member Functions | |
void | installVersion (const vector< const BinaryVersion * > &, const string &annotation=string(), RequestImportance importance=RequestImportance::Must) |
void | removeVersions (const vector< const BinaryVersion * > &, const string &annotation=string(), RequestImportance importance=RequestImportance::Must) |
virtual void | satisfyRelationExpression (const RelationExpression &, bool invert=false, const string &annotation=string(), RequestImportance importance=RequestImportance::Must, bool asAutomatic=false)=0 |
virtual void | upgrade ()=0 |
virtual void | setAutomaticallyInstalledFlag (const string &packageName, bool flagValue)=0 |
virtual bool | resolve (CallbackType)=0 |
perform a resolve computations More... | |
virtual | ~Resolver () |
destructor | |
dependency problems resolver
This class provides the dependency problems resolver interface for system state modifications.
First, you call class methods to specify how would you want to modify the system, and then you finally call resolve to get a consistent package set(s) for specified modifications.
typedef map< string, SuggestedPackage > cupt::system::Resolver::SuggestedPackages |
suggested set of packages
void cupt::system::Resolver::installVersion | ( | const vector< const BinaryVersion * > & | , |
const string & | annotation = string() , |
||
RequestImportance | importance = RequestImportance::Must |
||
) |
Requests installation of one of the specific version(s). If more than one version is supplied, installing any of them will be enough to satisfy this request.
annotation | passed to satisfyRelationExpression |
importance | passed to satisfyRelationExpression |
void cupt::system::Resolver::removeVersions | ( | const vector< const BinaryVersion * > & | , |
const string & | annotation = string() , |
||
RequestImportance | importance = RequestImportance::Must |
||
) |
Requests removal of all supplied versions.
annotation | passed to satisfyRelationExpression |
importance | passed to satisfyRelationExpression |
|
pure virtual |
perform a resolve computations
Takes all requested data and tries to find the best valid set of packages which conforms to what was requested.
true
if the solution was found and accepted by user, false
otherwise Implemented in cupt::system::NativeResolver.
|
pure virtual |
Requests that specified relation expression is satisfied.
invert | if set to true , unsatisfies the expression rather than satisfy it |
annotation | user-friendly description of request; if empty, standard one will be generated |
importance | specifies is the request mandatory, and if not, what is the penalty:
|
asAutomatic | if new packages are to be installed as a result of perfoming this request, their 'automaticallyInstalledFlag' will have the value of this parameter. |
Implemented in cupt::system::NativeResolver.
|
pure virtual |
Requests that if a solution will have the package packageName, its corresponding Offer::SuggestedPackage::automaticallyInstalledFlag will have the value of flagValue.
Implemented in cupt::system::NativeResolver.
|
pure virtual |
Requests an upgrade of all installed packages (to their preferred version).
Implemented in cupt::system::NativeResolver.