diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-03-27 08:48:05 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-03-27 08:48:05 +0100 |
| commit | 830e7c5d27d161b91402414e6ecd49f1ed818bfb (patch) | |
| tree | 448864635d29b1ea66424cbb9e0816fbcf1e1907 /lib/configuration/graph_tree.mli | |
Initial commit
Diffstat (limited to 'lib/configuration/graph_tree.mli')
| -rw-r--r-- | lib/configuration/graph_tree.mli | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/configuration/graph_tree.mli b/lib/configuration/graph_tree.mli new file mode 100644 index 0000000..31a8f79 --- /dev/null +++ b/lib/configuration/graph_tree.mli @@ -0,0 +1,25 @@ +type t + +val create : unit -> t + +val add_content : t -> Model.Reference.t Model.Content.t -> unit +(** Add a new content in the tree *) + +val add_edge : + t -> + Model.Reference.t Model.Content.t -> + Model.Reference.t Model.Field.t -> + Model.Reference.t Model.Content.t -> + unit +(** Add a relation between two contents. + + The function does not check if the two contents are actually linked together +*) + +val pp : Format.formatter -> t -> unit +val fold : (Model.Reference.t Model.Content.t -> 'a -> 'a) -> t -> 'a -> 'a +val iter : (Model.Reference.t Model.Content.t -> unit) -> t -> unit + +exception Cycle of Model.Reference.t Model.Content.t list + +val check_cycle : t -> unit |
