class %IPM.CLI
extends %IPM.CLI.Commands
parameter CommandsAccessorIncludeFilename;
Name of include file that will contain accessor macros for modifiers
and parameters referenced in the "Commands" XData block.
If provided, an include file will be generated and included in the sub-class
during compilation.
@API.Parameter
@API.Overrideable
classmethod %GetCommandStructure(Output pCommandStructure)
final classmethod %Help(ByRef pCommandInfo)
Displays help for a given command
classmethod %HelpForCommand(pCommandName As %String, ByRef pCommandStruct, pDetailed As %Boolean = 0, pMarkdownFormat As %Boolean = 0, pMaxLength As %Integer = 0)
final classmethod %ParseCommandInput(pCommandString As %String, Output pCommandInfo)
as %Status
Parses a command, validating it based on the Commands XData block and structuring output as follows:
pCommandInfo = ""
pCommandInfo("modifiers","") = ""
pCommandInfo("parameters","") = ""
pCommandInfo("data","") = ""
classmethod DrawBorder(pLineList As %Library.List, pTextFormat As %Integer = $$$Default)
Draw a border around a list of strings. Optionally provide a text format for the strings.
@Argument pLineList List of strings to write.
@Argument pTextFormat Text format (e.g. $$$Red, $$$Bold, etc.).
classmethod FormatName(pName As %String)
as %String
Format the given name such that all punctuation characters are remove and
the name is in camelCase, with the first letter capitalized.
@Argument pName String to format.
classmethod ParseJsonToCommand(pJson As %Library.DynamicObject)
Read JSON and construct a command matching the schema in the Commands XData blocks
that can be parsed using %ParseCommandInput.
JSON format:
{
"command": "command name",
"parameters": { ... },
"modifiers": { ... },
"custom_modifiers": { ... }
}
where each nested object contains key-value pairs.
classmethod TerminalPromptColor()
as %String