Release coccinelle-0.2.1-rc1
[bpt/coccinelle.git] / commons / ocollection / oassocbdb_string.mli
CommitLineData
91eba41f 1(* !!take care!!: this class does side effect, not a pure oassoc.
ae4735db 2 *
91eba41f
C
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,
ae4735db 5 * not in the disk. The only way to modify on the disk is to call
91eba41f
C
6 * #add or #replace with what you modified. Oassocbdb has no way
7 * to know that you modified it.
8 *)
ae4735db
C
9class ['b] oassoc_btree_string :
10 Bdb.db ->
11 string (* db name, for profiling *) ->
91eba41f
C
12 (unit -> Bdb.dbtxn option) (* transaction handler *) ->
13object('o)
14 inherit [string,'b] Oassoc.oassoc
15
16 (* ocollection concrete instantiation of virtual methods *)
17 method empty : 'o
18 method add : string * 'b -> 'o
19
20 method iter : (string * 'b -> unit) -> unit
21 method view : (string * 'b, 'o) Ocollection.view
22
23 method del : string * 'b -> 'o
24 method mem : string * 'b -> bool
25 method null : bool
26
27 (* oassoc concrete instantiation of virtual methods *)
28 method assoc : string -> 'b
29 method delkey : string -> 'o
30
31 method keys: string list
32
33end
34
ae4735db 35val create_bdb:
91eba41f
C
36 string ->
37 string ->
38 Bdb.dbenv ->
39 (unit -> Bdb.dbtxn option) ->
ae4735db
C
40 int ->
41 Bdb.db * (string, 'a) Oassoc_buffer.oassoc_buffer