(***********************************************************************)
(*                                                                     *)
(*                                 GALAX                               *)
(*                           XML Query Engine                          *)
(*                                                                     *)
(*  Copyright 2000, Lucent Technologies.                               *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: pool.mli,v 1.1 2001/10/26 16:42:04 simeon Exp $ *)

open Error

(******************************************************)
(* This module implements string pools to save memory *)
(******************************************************)

(* Signature for NamePool modules *)

module type NamePool =
  sig
    type name
    type symbol

    type namepool

    val create_pool : unit -> namepool
    val init_pool : namepool -> unit

    val get_name  : namepool -> symbol -> name
    val add_name  : namepool -> name -> symbol

    val exists_name : namepool -> name -> bool
    val symbol_equals : namepool -> symbol -> symbol -> bool
  end

(* Functor to create new name pool modules *)

module MakeNamePool (H: Hashtbl.HashedType) : (NamePool with type name = H.t)
