module Dynamic: sig
.. end
Registration
val register : ?comment:string ->
plugin:string -> string -> 'a Type.t -> journalize:bool -> 'a -> 'a
register ~plugin name ty v
registers
v
with the name
name
, the type
ty
and the plug-in
plugin
.
Raises Type.AlreadyExists
if
name
already exists. In other words you
cannot register a value with the same name twice.
Change in Boron-20100401: add the labeled argument "plugin"
Change in Oxygen-20120901: add the optional labeled argument "comment"
Consult the Plugin Development Guide for additional details.
Access
exception Incompatible_type of string
exception Unbound_value of string
exception Unloadable of string
Exception that a plug-in can throw if it detects that it
can't be loaded. It is caught by
Dynamic.load_module
and
Dynamic.load_script
Since Oxygen-20120901
val get : plugin:string -> string -> 'a Type.t -> 'a
get ~plugin name ty
returns the value registered with the name
name
, the type
ty
and the plug-in
plugin
. This plug-in will be
loaded if required.
RaisesUnbound_value
if the name is not registered
Incompatible_type
if the name is not registered
with a compatible type
Failure
_ in the -no-obj mode
Consult the Plugin Development Guide for additional details.
val iter : (string -> 'a Type.t -> 'a -> unit) -> unit
: (string -> string -> unit) -> unit
Since Oxygen-20120901
Dedicated access to plug-in parameters
module Parameter: sig
.. end
Module to use for accessing parameters of plug-ins.
Dynamically Loaded Modules
val load_module : string -> unit
Load the module specification. See -load-module option.
Change in Magnesium-20151001: new API.
val set_module_load_path : string list -> unit
Sets the load path for modules in FRAMAC_PLUGIN, prepending it with path
.
Does not load any plugins.
Must be invoked only once from boot during extending stage.
Since Phosphorus-20170501-beta1.