Release coccinelle-0.1.3
[bpt/coccinelle.git] / commons / ocollection / oassocbdb.mli
similarity index 59%
rename from commons/oassocbdb.mli
rename to commons/ocollection/oassocbdb.mli
index 7978e80..b01a4ab 100644 (file)
@@ -1,4 +1,11 @@
-(* !!take care!!: this class does side effect, not a pure oassoc *)
+(* !!take care!!: this class does side effect, not a pure oassoc.
+ * 
+ * Also can not put structure with ref or mutable field because when
+ * you will modify those refs or fields, you will modify it in the memory,
+ * not in the disk. The only way to modify on the disk is to call 
+ * #add or #replace with what you modified. Oassocbdb has no way
+ * to know that you modified it.
+ *)
 class ['a,'b] oassoc_btree : 
   Bdb.db -> 
   string                     (* db name, for profiling *) -> 
@@ -22,4 +29,15 @@ object('o)
   method assoc : 'a -> 'b
   method delkey : 'a -> 'o
 
+  method keys: 'a list
+
 end
+
+val create_bdb: 
+  string ->
+  string ->
+  Bdb.dbenv ->
+  (unit -> Bdb.dbtxn option) ->
+  ('a -> 'b) * ('c -> 'a) ->
+  int -> 
+  Bdb.db * ('d, 'a) Oassoc_buffer.oassoc_buffer