Skip to content

nexus_toolbox_hook

miscellaneous · scripts/miscellaneous/nexus_toolbox_hook.m

NEXUS_TOOLBOX_HOOK  Named extension points for optional toolboxes.

  Product code calls the extension points it offers:

      nexus_toolbox_hook ('point_name', ARG, ...)       # notify
      Y = nexus_toolbox_hook ('point_name', X, ...)     # transform X

  With no toolbox registered for POINT_NAME the notify form does nothing
  and the transform form returns X unchanged, so a product without
  toolboxes behaves exactly as if the call were not there.

  A toolbox registers a function from its nexus_toolbox_init script:

      nexus_toolbox_hook ('register', 'point_name', @my_function);

  Several functions may be registered for one point; they run in
  registration order.  In the transform form each receives the value
  produced by the previous one as its first argument.