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

SCM Repository

[smlnj] Annotation of /sml/branches/blume-private-devel/src/smlnj-lib/Controls/registry-sig.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1635 - (view) (download)

1 : jhr 1193 (* registry-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
4 :     *
5 :     * A registry collects together string controls; it supports generation
6 :     * of help messages and initialization from the environment.
7 :     *)
8 :    
9 :     signature CONTROL_REGISTRY =
10 :     sig
11 :    
12 :     type registry
13 :    
14 : mblume 1635 type control_info = { envName : string option }
15 :    
16 : jhr 1193 val new : {
17 :     help : string (* registry's description *)
18 :     } -> registry
19 :    
20 :     (* register a control *)
21 :     val register : registry -> {
22 :     ctl : string Controls.control,
23 :     envName : string option
24 :     } -> unit
25 :    
26 :     (* register a set of controls *)
27 :     val registerSet : registry -> {
28 :     ctls : (string, 'a) ControlSet.control_set,
29 :     mkEnvName : string -> string option
30 :     } -> unit
31 :    
32 :     (* nest a registry inside another registry *)
33 :     val nest : registry -> {
34 :     prefix : string option,
35 :     pri : Controls.priority, (* registry's priority *)
36 :     obscurity : int, (* registry's detail level; higher means *)
37 :     (* more obscure *)
38 :     reg : registry
39 :     } -> unit
40 :    
41 :     (* find a control *)
42 :     val control : registry -> string list -> string Controls.control option
43 :    
44 :     (* initialize the controls in the registry from the environment *)
45 :     val init : registry -> unit
46 :    
47 :     datatype registry_tree = RTree of {
48 : jhr 1199 path : string list,
49 : jhr 1193 help : string,
50 : mblume 1635 ctls : { ctl : string Controls.control, info : control_info } list,
51 : jhr 1193 subregs : registry_tree list
52 :     }
53 :    
54 :     val controls : (registry * int option) -> registry_tree
55 :    
56 :     end

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