1 (* !!take care!!: this class does side effect, not a pure oassoc.
3 * Also can not put structure with ref or mutable field because when
4 * you will modify those refs or fields, you will modify it in the memory,
5 * not in the disk. The only way to modify on the disk is to call
6 * #add or #replace with what you modified. Oassocbdb has no way
7 * to know that you modified it.
9 class ['a
,'b
] oassoc_btree
:
11 string (* db name, for profiling *) ->
12 (unit -> Bdb.dbtxn
option) (* transaction handler *) ->
13 ('b
-> 'e
) -> ('e
-> 'b
) (* marshaller/unmarshaller wrappers *) ->
15 inherit ['a
,'b
] Oassoc.oassoc
17 (* ocollection concrete instantiation of virtual methods *)
19 method add
: 'a
* 'b
-> 'o
21 method iter
: ('a
* 'b
-> unit) -> unit
22 method view
: ('a
* 'b
, 'o
) Ocollection.view
24 method del
: 'a
* 'b
-> 'o
25 method mem
: 'a
* 'b
-> bool
28 (* oassoc concrete instantiation of virtual methods *)
29 method assoc
: 'a
-> 'b
30 method delkey
: 'a
-> 'o
40 (unit -> Bdb.dbtxn
option) ->
41 ('a
-> 'b
) * ('c
-> 'a
) ->
43 Bdb.db
* ('d
, 'a
) Oassoc_buffer.oassoc_buffer