Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/smlnj-lib/Controls/registry-sig.sml
ViewVC logotype

View of /sml/trunk/src/smlnj-lib/Controls/registry-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1199 - (download) (annotate)
Fri May 17 19:25:31 2002 UTC (17 years, 3 months ago) by jhr
File size: 1385 byte(s)
  Sync with master repository.
(* registry-sig.sml
 *
 * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
 *
 * A registry collects together string controls; it supports generation
 * of help messages and initialization from the environment.
 *)

signature CONTROL_REGISTRY =
  sig

    type registry

    val new : {
	    help : string	(* registry's description *)
	  } -> registry

  (* register a control *)
    val register : registry -> {
	    ctl : string Controls.control,
	    envName : string option
	  } -> unit

  (* register a set of controls *)
    val registerSet : registry -> {
	    ctls : (string, 'a) ControlSet.control_set,
	    mkEnvName : string -> string option
	  } -> unit

  (* nest a registry inside another registry *)
    val nest : registry -> {
	    prefix : string option,
	    pri : Controls.priority,	(* registry's priority *)
            obscurity : int,		(* registry's detail level; higher means *)
					(* more obscure *)
	    reg : registry
	  } -> unit

  (* find a control *)
    val control : registry -> string list -> string Controls.control option

  (* initialize the controls in the registry from the environment *)
    val init : registry -> unit

    datatype registry_tree = RTree of {
	path : string list,
	help : string,
	ctls : string Controls.control list,
	subregs : registry_tree list
      }

    val controls : (registry * int option) -> registry_tree

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0