CommandPattern 1.0.0
This package contains a collection of classes and interfaces to allow for quick and consistent implementation of the command pattern across projects.
Public Member Functions | List of all members
SadSapphicGames.CommandPattern.NullCompositeCommand Class Reference

Like the NullCommand this is a composite command that does nothing, multiple times. More...

Inheritance diagram for SadSapphicGames.CommandPattern.NullCompositeCommand:
SadSapphicGames.CommandPattern.CompositeCommand SadSapphicGames.CommandPattern.IUndoable SadSapphicGames.CommandPattern.Command SadSapphicGames.CommandPattern.ICommand

Public Member Functions

 NullCompositeCommand (int size)
 Creates a NullCompositeCommand composed of multiple NullCommands More...
 
ICommand GetUndoCommand ()
 Like the NullCommand it is composed of, a NullCompositeCommand is its own undo-command More...
 
- Public Member Functions inherited from SadSapphicGames.CommandPattern.CompositeCommand
override void Execute ()
 Queues all of the child commands into the internal CommandStream and attempts to invoke all of them. Will throw an exception if one of its children fails after attempting to revert all its executed commands. More...
 
abstract void Execute ()
 Executes the command, do not invoke directly, instead use a CommandStream. More...
 
abstract void Execute ()
 Executes the function of the command More...
 
ICommand GetUndoCommand ()
 Creates a command to revert the changes of the implementing command More...
 

Additional Inherited Members

- Protected Member Functions inherited from SadSapphicGames.CommandPattern.CompositeCommand
virtual void AddChild (ICommand childCommand)
 Adds a Command to this objects children More...
 
- Protected Attributes inherited from SadSapphicGames.CommandPattern.CompositeCommand
List< ICommandsubCommands = new List<ICommand>()
 The child Commands that will be executed upon executing this object
 
CommandStream internalStream = new CommandStream()
 An internal CommandStream to provide more control of the execution of the subCommands of the Composite
 
- Properties inherited from SadSapphicGames.CommandPattern.CompositeCommand
int ChildCount [get]
 Number of child Commands included in this object
 

Detailed Description

Like the NullCommand this is a composite command that does nothing, multiple times.

Constructor & Destructor Documentation

◆ NullCompositeCommand()

SadSapphicGames.CommandPattern.NullCompositeCommand.NullCompositeCommand ( int  size)

Creates a NullCompositeCommand composed of multiple NullCommands

Parameters
sizeHow many NullCommands to include in the composite

Member Function Documentation

◆ GetUndoCommand()

ICommand SadSapphicGames.CommandPattern.NullCompositeCommand.GetUndoCommand ( )

Like the NullCommand it is composed of, a NullCompositeCommand is its own undo-command

Returns
This object

Implements SadSapphicGames.CommandPattern.IUndoable.


The documentation for this class was generated from the following file: