ESCBaseCommand
Extends: Resource
Description
A base class for every ESC command. Extending classes have to override the configure and run function
Constants Descriptions
COMMAND_NAME_REGEX
const COMMAND_NAME_REGEX: String = "(?<path>.+)/(?<file>[^.]+)(?<extension>\\.[^.]*$|$)"
EXTENSION_REGEX_GROUP
const EXTENSION_REGEX_GROUP: String = "extension"
FILE_REGEX_GROUP
const FILE_REGEX_GROUP: String = "file"
PATH_REGEX_GROUP
const PATH_REGEX_GROUP: String = "path"
Regex for creating command name based on the script’s filename, including named groups
Property Descriptions
command_name_regex
var command_name_regex: RegEx
Regex matcher for command names
Method Descriptions
configure
func configure() -> ESCCommandArgumentDescriptor
Return the descriptor of the arguments of this command
validate
func validate(arguments: Array) -> bool
Validate whether the given arguments match the command descriptor
run
func run(command_params: Array) -> int
Run the command
get_command_name
func get_command_name() -> String
Return the name of the command based on the script’s filename
interrupt
func interrupt()
Function called when the command is interrupted.