module Typed_parameter: sig .. end
Parameter settable through a command line option.
This is a low level API, internaly used by the kernel. As a plug-in
developer, you certainly prefer to use the API of
Plugin instead.
Since Nitrogen-20111001
Consult the Plugin Development Guide for additional details.
type ('a, 'b) gen_accessor = {
|
get : unit -> 'a; |
|
set : 'a -> unit; |
|
add_set_hook : ('b -> 'b -> unit) -> unit; |
|
add_update_hook : ('b -> 'b -> unit) -> unit; |
}
type 'a accessor = ('a, 'a) gen_accessor
type typed_accessor =
| |
Bool of bool accessor * string option |
| |
Int of int accessor * (unit -> int * int) |
| |
String of string accessor * (unit -> string list) |
| |
String_set of (string, Datatype.String.Set.t) gen_accessor |
| |
String_list of (string, string list) gen_accessor |
type parameter = private {
|
name : string; |
|
help : string; |
|
accessor : typed_accessor; |
|
is_set : unit -> bool; |
}
include Datatype.S_with_collections
val get : string -> t
Get the parameter from the option name.
val get_value : t -> string
Get the current value of the parameter, as a string.