Arbiter
Dependency manager library that supports decentralization
Public Member Functions | Public Attributes | List of all members
Arbiter::Requirement::Compound Class Referencefinal
Collaboration diagram for Arbiter::Requirement::Compound:
[legend]

Public Member Functions

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

Public Attributes

std::vector< std::shared_ptr< ArbiterRequirement > > _requirements
 

Detailed Description

Definition at line 272 of file Requirement.h.

Constructor & Destructor Documentation

§ Compound()

Arbiter::Requirement::Compound::Compound ( std::vector< std::shared_ptr< ArbiterRequirement >>  requirements)
explicit

Definition at line 277 of file Requirement.h.

Member Function Documentation

§ clone()

std::unique_ptr<Base> Arbiter::Requirement::Compound::clone ( ) const
overridevirtual

Implements Arbiter::Base.

Definition at line 281 of file Requirement.h.

§ cloneRequirement()

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

§ describe()

std::ostream& Arbiter::Requirement::Compound::describe ( std::ostream &  os) const
overridevirtual

Implements Arbiter::Base.

§ hash()

size_t Arbiter::Requirement::Compound::hash ( ) const
overridevirtualnoexcept

Implements ArbiterRequirement.

§ intersect()

std::unique_ptr<ArbiterRequirement> Arbiter::Requirement::Compound::intersect ( const ArbiterRequirement rhs) const
overridevirtual

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.

Implements ArbiterRequirement.

§ operator!=()

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

Definition at line 28 of file Types.h.

§ operator==()

bool Arbiter::Requirement::Compound::operator== ( const Arbiter::Base other) const
overridevirtual

Implements Arbiter::Base.

§ priority()

int Arbiter::Requirement::Compound::priority ( ) const
overridevirtualnoexcept

Returns the minimum priority index of all the requirements held by this compound requirement.

Reimplemented from ArbiterRequirement.

§ satisfiedBy()

bool Arbiter::Requirement::Compound::satisfiedBy ( const ArbiterSelectedVersion selectedVersion) const
overridevirtual

Returns whether this requirement would be satisfied by using the given selected version.

Implements ArbiterRequirement.

§ visit()

void Arbiter::Requirement::Compound::visit ( Visitor visitor) const
overridevirtual

Visits the requirement, then any child requirements.

The default implementation simply visits this requirement.

Reimplemented from ArbiterRequirement.

Member Data Documentation

§ _requirements

std::vector<std::shared_ptr<ArbiterRequirement> > Arbiter::Requirement::Compound::_requirements

Definition at line 275 of file Requirement.h.


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