permit multiline comments and strings in macros
[bpt/coccinelle.git] / commons / ograph_simple.mli
CommitLineData
978fd7e5
C
1open Common
2
3
4(* essentially a convenient way to access a hash and its reverse hash *)
5
6class ['key, 'node, 'edge] ograph_mutable :
7object ('o)
8 method add_node : 'key -> 'node -> unit
9 method del_node : 'key -> unit
abad11c5 10 method replace_node : 'key -> 'node -> unit
978fd7e5
C
11
12
13 method add_arc : ('key * 'key) -> 'edge -> unit
14 method del_arc : ('key * 'key) -> 'edge -> unit
15
16 method nodes : ('key, 'node) Oassoc.oassoc
17
18 method successors : 'key -> ('key * 'edge) Oset.oset
19 method predecessors : 'key -> ('key * 'edge) Oset.oset
20 method allsuccessors : ('key, ('key * 'edge) Oset.oset) Oassoc.oassoc
21
22
abad11c5
C
23 method del_leaf_node_and_its_edges : 'key -> unit
24
978fd7e5
C
25 method ancestors : 'key -> 'key Oset.oset
26 method leaf_nodes : unit -> 'key Oset.oset
27
28end
29
ae4735db
C
30val print_ograph_generic:
31 str_of_key:('key -> string) ->
32 str_of_node:('key -> 'node -> string) ->
33 Common.filename ->
34 ('key, 'node,'edge) ograph_mutable ->
978fd7e5 35 unit