Arbiter
Dependency manager library that supports decentralization
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
ArbiterResolvedDependencyGraph Struct Referencefinal

Represents a fully consistent, resolved dependency graph, preserving relationships between dependencies. More...

Collaboration diagram for ArbiterResolvedDependencyGraph:
[legend]

Classes

struct  NodeValue
 

Public Types

using EdgeMap = std::unordered_map< NodeKey, std::set< NodeKey >>
 
using NodeKey = ArbiterProjectIdentifier
 
using NodeMap = std::unordered_map< NodeKey, NodeValue >
 

Public Member Functions

void addNode (ArbiterResolvedDependency node, const ArbiterRequirement &initialRequirement, const Arbiter::Optional< ArbiterProjectIdentifier > &dependent) noexcept(false)
 Attempts to add the given node into the graph, as a dependency of dependent if specified. More...
 
std::unique_ptr< Arbiter::Baseclone () const override
 
ArbiterResolvedDependencyInstaller createInstaller () const
 
std::ostream & describe (std::ostream &os) const override
 
const EdgeMapedges () const
 
const NodeMapnodes () const
 
bool operator!= (const Base &other) const
 
bool operator== (const Arbiter::Base &other) const override
 
ArbiterResolvedDependency resolveNode (const NodeMap::key_type &key) const
 

Static Public Member Functions

static ArbiterResolvedDependency resolveNode (const NodeMap::value_type &node)
 

Detailed Description

Represents a fully consistent, resolved dependency graph, preserving relationships between dependencies.

Definition at line 18 of file Graph.h.

Member Typedef Documentation

§ EdgeMap

using ArbiterResolvedDependencyGraph::EdgeMap = std::unordered_map<NodeKey, std::set<NodeKey>>

Definition at line 46 of file Graph.h.

§ NodeKey

Definition at line 44 of file Graph.h.

§ NodeMap

Definition at line 45 of file Graph.h.

Member Function Documentation

§ addNode()

void ArbiterResolvedDependencyGraph::addNode ( ArbiterResolvedDependency  node,
const ArbiterRequirement initialRequirement,
const Arbiter::Optional< ArbiterProjectIdentifier > &  dependent 
)
noexcept

Attempts to add the given node into the graph, as a dependency of dependent if specified.

If the given node refers to a project which already exists in the graph, this method will attempt to intersect the version requirements of both.

Throws an exception if this addition would make the graph inconsistent.

§ clone()

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

Implements Arbiter::Base.

§ createInstaller()

ArbiterResolvedDependencyInstaller ArbiterResolvedDependencyGraph::createInstaller ( ) const

§ describe()

std::ostream& ArbiterResolvedDependencyGraph::describe ( std::ostream &  os) const
overridevirtual

Implements Arbiter::Base.

§ edges()

const EdgeMap& ArbiterResolvedDependencyGraph::edges ( ) const

Definition at line 64 of file Graph.h.

§ nodes()

const NodeMap& ArbiterResolvedDependencyGraph::nodes ( ) const

Definition at line 59 of file Graph.h.

§ operator!=()

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

Definition at line 28 of file Types.h.

§ operator==()

bool ArbiterResolvedDependencyGraph::operator== ( const Arbiter::Base other) const
overridevirtual

Implements Arbiter::Base.

§ resolveNode() [1/2]

static ArbiterResolvedDependency ArbiterResolvedDependencyGraph::resolveNode ( const NodeMap::value_type &  node)
static

§ resolveNode() [2/2]

ArbiterResolvedDependency ArbiterResolvedDependencyGraph::resolveNode ( const NodeMap::key_type &  key) const

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