core/app

application support library

Dependency Graph

core/app: 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

Start/Exit Functions

app_start()

Called by app_run() to perform all necessary startup actions. This includes loading configuration files, initializing settings, and finally calling the application callback: ${script_name}_init.

app_exit()

Called by app_run() to perform graceful exit actions.

Application Timer

app_timer_start()

Starts the application timer to track execution time. This registers a cleanup function (app_timer_cleanup()).

app_timer_cleanup()

Stops the application timer and reports the elapsed time (if $verbose = true). Called automatically when the script exits.

Application Commands

app_version()

Prints the package/tool version.

app_license()

Handles application license commands, displaying a summary, warranty information, or full license.

app_help()

Prints the top-level help text for the application.

app_check()

Executes the check command if it exists, otherwise issues a warning. The normal disptch would give an error and usage message.

Obviously, this is NOT an error, just an embarassment.

app_check_lib()

Executes the lib_check callback for each named library ($@). With no arguments, checks all libraries that have a lib_check callback.

app_usage()

Top-level application usage function. These commands are automatically available in all scripts and displayed after the top-level script command usage function has been called.

Application Command Dispatch

app_main()

Top-level application command dispatch function.

app_cmd_dispatch

Top-level command dispatch handler. It allows scripts to provide their own ${script_name}_dispatch function to add dynamic top-level commands. This mechanism should not be needed by most tools, as normal command dispatching methods suffice for a static command language.

Application Commands

app_cmd_builtin_usage() -

app_cmd_builtin_config()

Dispatches application configuration commands.

app_cmd_builtin_backup()

Dispatches application backup commands.

app_cmd_builtin_restore()

Dispatches application restore commands.

app_cmd_builtin_client()

Dispatches application client commands.

app_cmd_builtin_server()

Dispatches application server commands.

Public Interface

app_run()

Called at the end of every tool script, after defining all callbacks, commands, and other data and functions. It calls app_start(), app_main(), and app_exit() in that order.

Late Library Loading Function Chains

config_lib_load()

Chain function to initialize libraries loaded "late".

app_lib_load()

Chain function to initialize libraries loaded "late".


View the Developer Guide Index

View the Reference Manual Index


Generated on Tue Jul 4 17:01:44 PDT 2017 by mcsh d14 v0.21.0.