TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | May 2016 |
SPMSupports SPM | ✗ |
Maintained by Francesco Colleoni - nearit.com.
A plugin management module
NMPlug enables existing objects to implement “plugin-oriented” architectures, thanks to the definition of some protocols:
Pluggable
: defines the structure of a generic plugin: run(_:sender:)
(if implemented)PluginHubDelegate
: defines the structure of a plugin hub, which can: plug
, unplug
, start
, stop
and run
once)Extensible
: defines the structure of the object which should be extended with pluginsThis module provides basic implementations of a plugin hub and generic plugins. All plugins written with this module should Plugin
class, while the PluginHub
should be used as the plugin hub used by classes which implement Extensible
protocol.
Plugin messaging relies on instances of NMJSON.JSON
objects (see NMJSON).
Messages sent directly to a specific plugin requires knowledge about how plugins can respond to certain messages.