package mc2
Module Plugin.FactorySource
Source
type t = | Factory : {name : string;priority : int;(*how prioritary this plugin is. The lower, the earlier this plugin is loaded. NOTE: if plugin
*)brequires services provided by plugina, then we need to ensurea.priority < b.priorityrequires : 'a service_key_list;(*list of required services
*)build : int -> 'a service_list -> plugin;(*builder, taking:
- the unique ID of the plugin
- the list of services required by
requires
} -> t(*A plugin factory, i.e. the method to build a plugin with a given ID.
*)
Source
val make :
?priority:int ->
name:string ->
requires:'a service_key_list ->
build:(int -> 'a service_list -> plugin) ->
unit ->
t