MacroCommand class

A base ICommand implementation that synchronously executes other ICommands.

An MacroCommand maintains an list of ICommand factories called 'SubCommands'.

When execute is called, the MacroCommand instantiates and calls execute on each of its 'SubCommands' turn. Each 'SubCommand' will be passed a reference to the original INotification.

Unlike SimpleCommand, your subclass should not override execute, but instead, should override the initializeMacroCommand method, calling addSubCommand once for each 'SubCommand' to be executed.

See ICommand, IController, INotification, SimpleCommand, INotifier

Inheritance
Implemented types

Constructors

MacroCommand()
Constructor. [...]

Properties

facade IFacade
Return the Multiton Facade instance [...]
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
subCommands List<Function>
read / write

Methods

addSubCommand(Function commandFactory) → void
Add a 'SubCommand'. [...]
execute(INotification note) → void
Execute this MacroCommand's 'SubCommands'. [...]
override
getMultitonKey() String
inherited
initializeMacroCommand() → void
Initialize the MacroCommand. [...]
initializeNotifier(String key) → void
Initialize this INotifier instance. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
sendNotification(String noteName, [dynamic body, String type]) → void
Send an INotification. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited