logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MacroCmd - a command that composes other commands

Description

       MacroCmd  composes  other  commands in a linear fashion.  Executing a MacroCmd is equivalent to executing
       its children in preorder.

Name

       MacroCmd - a command that composes other commands

Protected Operations

Command*Cmd(UList*)UList*Elem(Iterator)
              Convenience  functions  for  extracting  a  Command from a UList element a UList from an iterator,
              respectively.

Public Operations

MacroCmd(ControlInfo*)MacroCmd(Editor*=nil,Command*first=nil,Command*second=nil,Command*third=nil,Command*fourth=nil)
              Construct a MacroCmd instance, optionally supplying up to four of its child commands.

       virtualvoidExecute()virtualvoidUnexecute()virtualbooleanReversible()
              Execute simply executes each child, from first to last.  Unexecute calls Unexecute on each  child,
              from last to first.  The MacroCmd is reversible if any of its children are.

       virtualvoidSetEditor(Editor*)
              SetEditor calls SetEditor on each child with the given argument.

       Command*GetCommand(Iterator)voidSetCommand(Command*,Iterator&)
              GetCommand  returns  the  child  Command  to which an iterator points.  SetCommand initializes the
              iterator to point to a particular child Command; it initializes the iterator to  point  to  a  nil
              instance if the given Command is not a child.

       voidAppend(Command*,Command*=nil,Command*=nil,Command*=nil)voidPrepend(Command*,Command*=nil,Command*=nil,Command*=nil)voidInsertAfter(Iterator,Command*)voidInsertBefore(Iterator,Command*)voidRemove(Command*)voidRemove(Iterator&)
              Operations that modify the MacroCmd's list of children. Append and Prepend add up to four Commands
              to  the  end  and  the beginning of the list, respectively.  InsertAfter and InsertBefore insert a
              Command after and before the Command  pointed  to  by  the  iterator,  respectively.   The  Remove
              operations  remove a child from the list without deleting it.  You can remove a child by referring
              to it explicitly or by specifying an iterator.  If an iterator is supplied, the  Remove  operation
              should advance it to point to the following child as a side effect.

See Also

Command(3U), Iterator(3U), UList(3U)

Unidraw                                          24 January 1991                                    MacroCmd(3U)

Synopsis

#include<Unidraw/Commands/macro.h>

See Also