workflo.macros.registry
defregistry
macro
(defregistry name)
(defregistry name callback)
Defines a registry with the given name. See defregistry* for more information.
defregistry*
(defregistry* name)
(defregistry* name env)
(defregistry* name callback env)
Defines a registry with the given name. The resulting registry maps names (e.g. screen, view or command names) to definitions (e.g. the definition of a screen, a command or a view).
Definitions in the registry can be looked up using one of the utility functions that are defined implicitly.
(defregistry* ’command) (defregistry* ’command (fn [event entity-name] …))
will result in the following functions to be defined:
(defn register-command! [name def] …) (defn unregister-command! [name] …) (defn registered-commands [] …) (defn reset-registered-commands! [] …) (defn resolve-command [name] …).