core/lib

Loadable library support

Script Overview

The lib library provides the foundation for dynamic library loading in the MCSH framework.

Dependency Graph

core/lib: Library Dependencies

View the full-size SVG (svg) or PDF (pdf) image or graphviz source (dot)

View color source code (raw) for this file

View reStructuredText (rst) source code for this page

library interface

$lib_loaded[]

Lists libraries in the order they were loaded

$lib_inited[]

Lists libraries in the order they were initialized

Internal Functions

lib_load_check()

Check library loads, temporarily alterning logging messages to improve debugging. This definition replaces the basic implementation provided by the main runtime library (mcsh).

check for built-in library

Library Command Dispatch

lib_load_dispatch()

Loads library ($1) and runs command in namespace ($2)

lib_load_dispatch_ns()

Loads the named library ($1) and runs the command in default namespace

Library Configuration Settings

The functions provided in this section should only be used inside the config_init callback of libraries to define their settings. For more information, see the core/settings library.

lib_setting_vars()

Adds variable settings for the current library.

lib_setting_arrays()

Adds array settings for the current library.

lib_setting_assocs()

Adds associative arrays for the current library.

lib_setting_funcs()

Adds function settings for the current library.

Library Command Dispatch

lib_cmd_name()

Prints a library command name for the given commands ($@)

lib_cmd_exists()

Returns true if a library ($1) contains a function to handle the given commands ($@).

lib_cmd_exec()

Runs a command ($2) in a library ($1), if it exists.

$1 - Library name

$2 - Command name

$@ - Extra arguments

lib_cmd_dispatch()

Dispatches commands in the given library namespace ($1).

Library Iteration

for_each_lib()

Calls the given command ($@) for each initialized library.

for_each_lib_loaded()

Calls the given command ($@) for each loaded library.

Library Dependencies

lib_dep_list()

Prints list of library dependencies for the given library script file ($1)

lib_deps()

Prints list of dependencies for the given library ($1)

Library Testing

lib_check()

Runs the check method for the named library ($1)

lib_check_all()

Runs the check method for all libraries


View the Developer Guide Index

View the Reference Manual Index


Generated on Thu Jun 21 06:58:34 PDT 2018 by mcsh d14 v0.24.0.