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/branches/blume-private-devel/src/smlnj-lib/Controls/registry-sig.sml
ViewVC logotype

View of /sml/branches/blume-private-devel/src/smlnj-lib/Controls/registry-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1635 - (download) (annotate)
Tue Sep 28 17:12:31 2004 UTC (15 years, 10 months ago) by mblume
File size: 1469 byte(s)
merging changes from main trunk
(* 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

    type control_info = { envName : string option }

    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 : { ctl : string Controls.control, info : control_info } 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