Coccinelle release-1.0.0-rc11
[bpt/coccinelle.git] / commons / objet.ml
CommitLineData
34e49164
C
1open Common
2
3(* TypeClass via objects. Cf also now interfaces.ml
ae4735db 4 *
34e49164
C
5 * todo? get more inspiration from Java to put fundamental interfaces
6 * here ? such as cloneable, equaable, showable, debugable, etc
7 *)
8
9class virtual objet =
10object(o:'o)
ae4735db 11 method invariant: unit -> unit = fun () ->
34e49164 12 raise Todo
ae4735db 13 (* method check: unit -> unit = fun () ->
34e49164
C
14 assert(o#invariant());
15 *)
16
ae4735db 17 method of_string: string -> unit =
34e49164 18 raise Todo
ae4735db 19 method to_string: unit -> string =
34e49164 20 raise Todo
ae4735db 21 method debug: unit -> unit =
34e49164
C
22 raise Todo
23
ae4735db 24 method misc_op_hook: unit -> 'o =
34e49164
C
25 raise Todo
26
ae4735db 27 method misc_op_hook2: unit =
34e49164
C
28 ()
29end