Module Plugin


module Plugin: sig .. end
Provided plug-general services for plug-ins.
Since Beryllium-20090601-beta1


Signatures


type group = Cmdline.Group.t 
Group of parameters.
Since Beryllium-20090901
module type Parameter = sig .. end
Generic signature of a parameter.
module type Bool = sig .. end
Signature for a boolean parameter.
module type WithOutput = sig .. end
Signature for a boolean parameter that causes something to be output.
module type Int = sig .. end
Signature for an integer parameter.
module type String = sig .. end
Signature for a string parameter.
module type String_collection = sig .. end
Signature for a generic set of strings option.
module type String_set = String_collection  with type t = Datatype.String.Set.t
module type String_list = String_collection  with type t = string list
module type String_hashtbl = sig .. end

Complex values indexed by strings


module type Indexed_val = sig .. end
option interface
module type Parameter_input = sig .. end
Minimal signature to implement for each parameter corresponding to an option on the command line argument.
module type Parameter_input_with_arg = sig .. end
Minimal signature to implement for each parameter corresponding to an option on the command line argument which requires an argument.
module type Indexed_val_input = sig .. end
input signature for IndexedVal
module type S = sig .. end

type plugin = private {
   p_name : string;
   p_help : string;
   p_parameters : (string, Parameter.t list) Hashtbl.t;
}
Only iterable parameters (see Plugin.do_iterate and Plugin.do_not_iterate) are registered in the field p_parameters.
Since Beryllium-20090901
module type General_services = sig .. end

Configuration of functor applications generating parameters

You can apply the below functions juste before applying one of the functors provided by the functor Register and generating a new parameter.

val set_cmdline_stage : Cmdline.stage -> unit
Set the stage where the option corresponding to the parameter is recognized. Default is Cmdline.Configuring.
Since Beryllium-20090601-beta1
val do_not_journalize : unit -> unit
Prevent journalization of the parameter.
Since Beryllium-20090601-beta1
val do_not_projectify : unit -> unit
Prevent projectification of the parameter: its state is shared by all the existing projects. Also imply Plugin.do_not_save.
Since Beryllium-20090601-beta1
val do_not_save : unit -> unit
Prevent serialization of the parameter.
Since Carbon-20110201
val set_negative_option_name : string -> unit
For boolean parameters, set the name of the negative option generating automatically from the positive one (the given option name). The default used value prefixes the given option name by "-no". Assume that the given string is a valid option name or empty. If it is empty, no negative option is created.
Since Beryllium-20090601-beta1
val set_negative_option_help : string -> unit
For boolean parameters, set the help message of the negative option generating automatically. Assume that the given string is non empty.
Since Beryllium-20090601-beta1
val set_optional_help : (unit, Format.formatter, unit) Pervasives.format -> unit
Concatenate an additional description just after the default one.
Since Beryllium-20090601-beta1
val set_group : group -> unit
Affect a group to the parameter.
Since Beryllium-20090901
val is_invisible : unit -> unit
Prevent the help to list the parameter. Also imply Plugin.do_not_iterate.
Since Carbon-20101201
Change in Nitrogen-20111001: does not appear in the help
val do_iterate : unit -> unit
Ensure that Plugin.iter_on_plugins is applied to this parameter. By default only parameters corresponding to options registered at the Cmdline.Configuring stage are iterable.
Since Nitrogen-20111001
val do_not_iterate : unit -> unit
Prevent Plugin.iter_on_plugins to be applied on the parameter. By default, only parameters corresponding to options registered at the Cmdline.Configuring stage are iterable.
Since Nitrogen-20111001
module Register: 
functor (P : sig
val name : string
Name of the module. Arbitrary non-empty string.
val shortname : string
Prefix for plugin options. No space allowed.
val help : string
description of the module. Free-form text.
end) -> General_services
Functors for generating plug-ins parameters.

Handling groups of parameters


val get : string -> plugin
Get a plug-in from its shortname. Not very efficient yet.
Since Nitrogen-20111001
val iter_on_plugins : (plugin -> unit) -> unit
Iterate on each registered plug-ins.
Since Beryllium-20090901
val get_selection : unit -> State_selection.t
Selection of all the settable parameters.
Consult the Plugin Development Guide for additional details.
val get_selection_context : unit -> State_selection.t
Selection of all the parameters which may have an impact on some analysis.
val positive_debug_ref : int Pervasives.ref
Not for casual users.
Since Boron-20100401

Deprecated API


val at_normal_exit : (unit -> unit) -> unit
Deprecated.since Boron-20100401
Now replaced by Cmdline.at_normal_exit.
Since Beryllium-20090901
val run_normal_exit_hook : unit -> unit
Deprecated.since Boron-20100401
Now replaced by Cmdline.run_normal_exit_hook.
Since Beryllium-20090901