declare extension
declares the extension
function.
The function is run when one of the features provided
by the extension
is required by the call to Bap_main.init
and all features
needed by the extension are present.
If extension
evaluates to Error condition
, then no other extensions will be evaluated and the initialization procedure will stop immediately with the Error condition
as the final result.
If extension
raises an exception e
, then it will be caught, and the initialization procedure will terminated immediately with the Error (Error.Bug (e,backtrace)
.
@parameter features is a set of application features that the declared extension expects. If there is a feature that is required but not provided by an application, then the extension will not be evaluated. See the corresponding features
parameter of the init
function, as well as the Features section.
@parameter provides is a set of features that the extension provides. During the initialization, only those extensions that provide features that are requested by the application are loaded. All configuration parameters of the extension will be attributed with tags from the provides
set, so that they will only affect those components that explicitly depend on of the specified features. Note that, the set of provided features is shared by all extensions of a plugin, in other words it is an attribute of a plugin rather than of a particular extension function.
@parameter doc is the documentation provided with the extension. It can take a form of a one line description or a full manual written in the markdown syntax. See the corresponding man
parameter of the Bap_main.init
function.