Module Plugin

module Plugin: sig .. end
Provided plug-general services for plug-ins.
Since Beryllium-20090601-beta1
Consult the Plugin Development Guide for additional details.

module type S = sig .. end
type plugin = private {
   p_name : string;
   p_shortname : string;
   p_help : string;
   p_parameters : (string, Typed_parameter.t list) Hashtbl.t;
}
Only iterable parameters (see do_iterate and do_not_iterate) are registered in the field p_parameters.
Since Beryllium-20090901
module type General_services = sig .. end
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 registering a new plug-in.
val is_share_visible : unit -> unit
Make visible to the end-user the -<plug-in>-share option. To be called just before applying Plugin.Register to create plug-in services.
Since Oxygen-20120901
val is_session_visible : unit -> unit
Make visible to the end-user the -<plug-in>-session option. To be called just before applying Plugin.Register to create plug-in services.
Since Neon-20130301
val is_config_visible : unit -> unit
Make visible to the end-user the -<plug-in>-config option. To be called just before applying Plugin.Register to create plug-in services.
Since Neon-20130301
val plugin_subpath : string -> unit
Use the given string as the sub-directory in which the plugin files will be installed (ie. share/frama-c/plugin_subpath...). Relevant for directories Share, Session and Config above.
Since Neon-20130301

Handling plugins


val get_from_shortname : string -> plugin
Get a plug-in from its shortname.
Since Oxygen-20120901
val get_from_name : string -> plugin
Get a plug-in from its name.
Since Oxygen-20120901
val get : string -> plugin
Deprecated.since Oxygen-20120901
Get a plug-in from its name.
val iter_on_plugins : (plugin -> unit) -> unit
Iterate on each registered plug-ins.
Since Beryllium-20090901