Cupt
Public Member Functions | List of all members
cupt::system::NativeResolver Class Reference

library's problem resolver implementation More...

#include <cupt/system/resolvers/native.hpp>

Inheritance diagram for cupt::system::NativeResolver:
cupt::system::Resolver

Public Member Functions

 NativeResolver (const shared_ptr< const Config > &, const shared_ptr< const Cache > &)
 constructor
 
void satisfyRelationExpression (const RelationExpression &, bool, const string &, RequestImportance, bool)
 
void upgrade ()
 
void setAutomaticallyInstalledFlag (const string &, bool)
 
bool resolve (Resolver::CallbackType)
 perform a resolve computations More...
 
- Public Member Functions inherited from cupt::system::Resolver
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 ~Resolver ()
 destructor
 

Additional Inherited Members

- Public Types inherited from cupt::system::Resolver
typedef map< string, SuggestedPackageSuggestedPackages
 
typedef std::function< UserAnswer::Type(const Offer &) > CallbackType
 callback function type
 

Detailed Description

library's problem resolver implementation

Member Function Documentation

◆ resolve()

bool cupt::system::NativeResolver::resolve ( Resolver::CallbackType  )
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.

Returns
true if the solution was found and accepted by user, false otherwise

Implements cupt::system::Resolver.

◆ satisfyRelationExpression()

void cupt::system::NativeResolver::satisfyRelationExpression ( const RelationExpression ,
bool  invert,
const string &  annotation,
RequestImportance  importance,
bool  asAutomatic 
)
virtual

Requests that specified relation expression is satisfied.

Parameters
invertif set to true, unsatisfies the expression rather than satisfy it
annotationuser-friendly description of request; if empty, standard one will be generated
importancespecifies is the request mandatory, and if not, what is the penalty:
  • Must: request is mandatory;
  • Try: request is optional, penalty is the value of 'cupt::resolver::score::unsatisfied-try' option;
  • Wish: request is optiona, penalty is the value of 'cupt::resolver::score::unsatisfied-wish' option;
  • any other value: request is optional, penalty is the value itself.
asAutomaticif new packages are to be installed as a result of perfoming this request, their 'automaticallyInstalledFlag' will have the value of this parameter.

Implements cupt::system::Resolver.

◆ setAutomaticallyInstalledFlag()

void cupt::system::NativeResolver::setAutomaticallyInstalledFlag ( const string &  packageName,
bool  flagValue 
)
virtual

Requests that if a solution will have the package packageName, its corresponding Offer::SuggestedPackage::automaticallyInstalledFlag will have the value of flagValue.

Implements cupt::system::Resolver.

◆ upgrade()

void cupt::system::NativeResolver::upgrade ( )
virtual

Requests an upgrade of all installed packages (to their preferred version).

Implements cupt::system::Resolver.


The documentation for this class was generated from the following file: