Arbiter
Dependency manager library that supports decentralization
Public Member Functions | List of all members
ArbiterRequirement Struct Referenceabstract

Represents a requirement for a specific version or set of versions. More...

Collaboration diagram for ArbiterRequirement:
[legend]

Public Member Functions

virtual std::unique_ptr< Base > clone () const =0
 
std::unique_ptr< ArbiterRequirementcloneRequirement () const
 
virtual std::ostream & describe (std::ostream &os) const =0
 
virtual size_t hash () const noexcept=0
 
virtual std::unique_ptr< ArbiterRequirementintersect (const ArbiterRequirement &rhs) const =0
 Attempts to create a requirement which expresses the intersection of this requirement and the given one. More...
 
bool operator!= (const Base &other) const
 
virtual bool operator== (const Base &other) const =0
 
virtual int priority () const noexcept
 Returns the priority of this requirement. More...
 
virtual bool satisfiedBy (const ArbiterSelectedVersion &selectedVersion) const =0
 Returns whether this requirement would be satisfied by using the given selected version. More...
 
virtual void visit (Arbiter::Requirement::Visitor &visitor) const
 Visits the requirement, then any child requirements. More...
 

Detailed Description

Represents a requirement for a specific version or set of versions.

Definition at line 24 of file Requirement.h.

Member Function Documentation

§ clone()

virtual std::unique_ptr<Base> Arbiter::Base::clone ( ) const
pure virtualinherited

§ cloneRequirement()

std::unique_ptr<ArbiterRequirement> ArbiterRequirement::cloneRequirement ( ) const

§ describe()

virtual std::ostream& Arbiter::Base::describe ( std::ostream &  os) const
pure virtualinherited

§ hash()

virtual size_t ArbiterRequirement::hash ( ) const
pure virtualnoexcept

§ intersect()

virtual std::unique_ptr<ArbiterRequirement> ArbiterRequirement::intersect ( const ArbiterRequirement rhs) const
pure virtual

Attempts to create a requirement which expresses the intersection of this requirement and the given one.

In other words, this attempts to find the loosest possible requirement which is a superset of the two inputs. Any version which passes the intersected requirement would also pass either one of the original inputs.

Returns nullptr if no intersection is possible.

Implemented in Arbiter::Requirement::Prioritized, Arbiter::Requirement::Compound, Arbiter::Requirement::Custom, Arbiter::Requirement::Unversioned, Arbiter::Requirement::Exactly, Arbiter::Requirement::CompatibleWith, Arbiter::Requirement::AtLeast, and Arbiter::Requirement::Any.

§ operator!=()

bool Arbiter::Base::operator!= ( const Base other) const
inherited

Definition at line 28 of file Types.h.

§ operator==()

virtual bool Arbiter::Base::operator== ( const Base other) const
pure virtualinherited

§ priority()

virtual int ArbiterRequirement::priority ( ) const
virtualnoexcept

Returns the priority of this requirement.

Reimplemented in Arbiter::Requirement::Prioritized, and Arbiter::Requirement::Compound.

Definition at line 36 of file Requirement.h.

§ satisfiedBy()

virtual bool ArbiterRequirement::satisfiedBy ( const ArbiterSelectedVersion selectedVersion) const
pure virtual

§ visit()

virtual void ArbiterRequirement::visit ( Arbiter::Requirement::Visitor visitor) const
virtual

Visits the requirement, then any child requirements.

The default implementation simply visits this requirement.

Reimplemented in Arbiter::Requirement::Prioritized, and Arbiter::Requirement::Compound.


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