webmcp

diff framework/bin/mcp.lua @ 294:0a6378afc6da

Documentations of global constants
author jbe
date Sun Mar 22 17:33:37 2015 +0100 (2015-03-22)
parents 7c3aec7f1a7d
children 4e69ce9a6365
line diff
     1.1 --- a/framework/bin/mcp.lua	Sun Mar 22 17:17:22 2015 +0100
     1.2 +++ b/framework/bin/mcp.lua	Sun Mar 22 17:33:37 2015 +0100
     1.3 @@ -1,6 +1,12 @@
     1.4  #!/usr/bin/env moonbridge
     1.5  
     1.6 +--[[--
     1.7 +WEBMCP_VERSION
     1.8 +
     1.9 +A string containing the WebMCP version, e.g. "2.0.0"
    1.10 +--]]--
    1.11  WEBMCP_VERSION = "2.0.0"
    1.12 +--//--
    1.13  
    1.14  -- allow control of global environment
    1.15  local _G = _G
    1.16 @@ -13,15 +19,51 @@
    1.17  }
    1.18  _ENV = setmetatable({}, global_metatable)
    1.19  
    1.20 +--[[--
    1.21 +WEBMCP_MODE
    1.22 +
    1.23 +A constant set to "listen" in case of a network request, or set to "interactive" in case of interactive mode.
    1.24 +--]]--
    1.25  -- check if interactive mode
    1.26  if listen then  -- defined by moonbridge
    1.27    WEBMCP_MODE = "listen"
    1.28  else
    1.29    WEBMCP_MODE = "interactive"
    1.30  end
    1.31 +--//--
    1.32  
    1.33 --- configuration names are provided as 4th, 5th, etc. argument
    1.34 +--[[--
    1.35 +WEBMCP_CONFIG_NAMES
    1.36 +
    1.37 +A list of the selected configuration names.
    1.38 +--]]--
    1.39 +-- configuration names are provided as 4th, 5th, etc. command line argument
    1.40  WEBMCP_CONFIG_NAMES = {select(4, ...)}
    1.41 +--//--
    1.42 +
    1.43 +--[[--
    1.44 +WEBMCP_FRAMEWORK_PATH
    1.45 +
    1.46 +Directory of the WebMCP framework (always includes a trailing slash).
    1.47 +--]]--
    1.48 +-- set in mcp.lua
    1.49 +--//--
    1.50 +
    1.51 +--[[--
    1.52 +WEBMCP_BASE_PATH
    1.53 +
    1.54 +Base directory of the application (always includes a trailing slash).
    1.55 +--]]--
    1.56 +-- set in mcp.lua
    1.57 +--//--
    1.58 +
    1.59 +--[[--
    1.60 +WEBMCP_APP_NAME
    1.61 +
    1.62 +Application name (usually "main"). May be nil in case of interactive mode.
    1.63 +--]]--
    1.64 +-- set in mcp.lua
    1.65 +--//--
    1.66  
    1.67  -- determine framework and bath path from command line arguments
    1.68  -- or print usage synopsis (if applicable)

Impressum / About Us