module RemiLib::DependencyGraph
Overview
A simple way to specify dependencies between items. This particular implementation does not support circular references.
Defined in:
remilib/dependencygraph.crClass Method Summary
-
.getOrder(deps : Array(Node(N, T))) : Array(N) forall N, T
Resolves the dependency graph, then returns the order for the dependencies as an array of
N
. -
.getOrder(*deps : Node(N, T)) : Array(N) forall N, T
Resolves the dependency graph, then returns the order for the dependencies as an array of
N
. -
.run(root : Node(N, T), fn : Proc(N, T, Nil)) : Int forall N, T
Resolves the dependency graph, calling
fn
for each item in the graph in the order of their dependencies. -
.run(fn : Proc(N, T, Nil), deps : Array(Node(N, T))) : Nil forall N, T
Resolves the dependency graph, calling
fn
for each item in the graph in the order of their dependencies. -
.run(fn : Proc(N, T, Nil), *deps : Node(N, T)) : Nil forall N, T
Resolves the dependency graph, calling
fn
for each item in the graph in the order of their dependencies.
Class Method Detail
Resolves the dependency graph, then returns the order for the dependencies
as an array of N
. Essentially, a dry run.
Resolves the dependency graph, then returns the order for the dependencies
as an array of N
. Essentially, a dry run.
Resolves the dependency graph, calling fn
for each item in the graph in
the order of their dependencies. Returns the number of dependencies that
were resolved.
Resolves the dependency graph, calling fn
for each item in the graph in
the order of their dependencies. Returns the number of dependencies that
were resolved.
Resolves the dependency graph, calling fn
for each item in the graph in
the order of their dependencies. Returns the number of dependencies that
were resolved.