summaryrefslogtreecommitdiff
path: root/lib/configuration/graph_tree.mli
blob: 31a8f79a923d3f86826558a7793d2c53b6ec1145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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