paludis  Version 2.6.0
Public Member Functions | List of all members
paludis::AdditionalPackageDepSpecRequirement Class Referenceabstract

#include <additional_package_dep_spec_requirement.hh>

+ Inheritance diagram for paludis::AdditionalPackageDepSpecRequirement:

Public Member Functions

 AdditionalPackageDepSpecRequirement (const AdditionalPackageDepSpecRequirement &)=delete
 
AdditionalPackageDepSpecRequirementoperator= (const AdditionalPackageDepSpecRequirement &)=delete
 
virtual const std::pair< bool, std::string > requirement_met (const Environment *const, const ChangedChoices *const maybe_changes_to_owner, const std::shared_ptr< const PackageID > &target_id, const std::shared_ptr< const PackageID > &spec_id, const ChangedChoices *const maybe_changes_to_target) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual Tribool accumulate_changes_to_make_met (const Environment *const, const ChangedChoices *const maybe_changes_to_owner, const std::shared_ptr< const PackageID > &, const std::shared_ptr< const PackageID > &spec_id, ChangedChoices &) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual const std::string as_human_string (const std::shared_ptr< const PackageID > &spec_id) const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual const std::string as_raw_string () const PALUDIS_ATTRIBUTE((warn_unused_result))=0
 

Detailed Description

An additional requirement for a PackageDepSpec.

Since
0.26

Member Function Documentation

virtual Tribool paludis::AdditionalPackageDepSpecRequirement::accumulate_changes_to_make_met ( const Environment const,
const ChangedChoices *const  maybe_changes_to_owner,
const std::shared_ptr< const PackageID > &  ,
const std::shared_ptr< const PackageID > &  spec_id,
ChangedChoices  
) const
pure virtual

If possible, indicate which choices to change to make our requirement met for a particular ID.

Verifies that the ID has the appropriate choice, and that that choice isn't locked.

Returns true for changes made, false for not possible, indeterminate for nothing needs changing.

Parameters
spec_idThe PackageID the spec comes from. May be null. Used for [use=] style dependencies.
Since
0.51
0.55 returns Tribool
0.58 takes spec_id

Implemented in paludis::ExcludeRequirement, and paludis::UserKeyRequirement.

virtual const std::string paludis::AdditionalPackageDepSpecRequirement::as_human_string ( const std::shared_ptr< const PackageID > &  spec_id) const
pure virtual

Return a human readable string representation of ourself.

Parameters
spec_idThe PackageID the spec comes from. May be null. Used for [use=] style dependencies.
Since
0.58 takes spec_id

Implemented in paludis::ExcludeRequirement, and paludis::UserKeyRequirement.

virtual const std::string paludis::AdditionalPackageDepSpecRequirement::as_raw_string ( ) const
pure virtual

Return a raw string representation of ourself.

Implemented in paludis::ExcludeRequirement, and paludis::UserKeyRequirement.

virtual const std::pair<bool, std::string> paludis::AdditionalPackageDepSpecRequirement::requirement_met ( const Environment const,
const ChangedChoices *const  maybe_changes_to_owner,
const std::shared_ptr< const PackageID > &  target_id,
const std::shared_ptr< const PackageID > &  spec_id,
const ChangedChoices *const  maybe_changes_to_target 
) const
pure virtual

Is our requirement met for a given PackageID?

The string in the return type might be a description of why the requirement was not met. Sometimes better messages can be given than simply the return value of as_human_string() when the ID to be matched is known. If the bool is true, the string is meaningless.

Parameters
spec_idThe PackageID the spec comes from. May be null. Used for [use=] style dependencies.
Since
0.44 returns pair<bool, std::string>
0.51 takes optional ChangedChoices arguments
0.58 takes id by shared_ptr
0.58 takes spec_id

Implemented in paludis::ExcludeRequirement, and paludis::UserKeyRequirement.


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