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.
|
Classes | |
class | AlreadyRunningException |
This exception indicates an AsyncCommand was executed but its task had yet to complete. Only one CommandTask per instance can be running at a time. Handled by CommandStream. More... | |
class | AsyncCommand |
The base class of all commands who's execute method involves asynchronous tasks More... | |
class | Command |
The base class of all commands More... | |
class | CommandStream |
This is the object that stores commands to be invoked and executes them when told to by the client. It has no knowledge of the implementation of commands beyond their interfaces. More... | |
class | CompositeCommand |
A Command that is composed of multiple child commands, all of which are executed together and leave one record in the CommandStream's history. <remark> For more information on this type of object seek external documentation on the composite design pattern </remark> More... | |
interface | IAsyncCommand |
This Interface of the AsyncCommand abstract class, It is strongly recommended you use the AsyncCommand class rather than implement this yourself unless you are very familiar with asynchronous programming More... | |
interface | ICommand |
This is the Interface of the Command abstract class, unless you are defining your own base type for commands you should probably inherit from Command over this More... | |
interface | IFailable |
Interface implemented by commands that could fail to execute. Commands that would fail do not have their execute method invoked and are not recorded in the CommandStream's history More... | |
class | IrreversibleCompositeFailureException |
An exception that indicates a CompositeCommand is executed but one of its children failed and the composite cannot undo its executed commands More... | |
interface | IUndoable |
Indicates a command can be undone More... | |
class | NullCommand |
A Command that does nothing More... | |
class | NullCompositeCommand |
Like the NullCommand this is a composite command that does nothing, multiple times. More... | |
class | ReversibleCompositeFailureException |
An exception that indicates a CompositeCommand is executed but one of its children failed, however the composite was able to undo the commands it had executed More... | |
class | SimpleComposite |
A CompositeCommand created from a collection of Command's that cannot fail More... | |
class | SingletonCommandManager |
A singleton manager for a single-stream, out of the box implementation of the Command pattern. Once you understand how the package works it is highly recommended create your own CommandStream wrapper tailored to the needs of your project. Executes the next command in the CommandStream every frame. More... | |
Enumerations | |
enum | ExecuteCode { Success , Failure , QueueEmpty , CompositeFailure , AwaitingCompletion , AlreadyRunning } |
The possible return values of CommandStream.TryExecuteNext() More... | |
The possible return values of CommandStream.TryExecuteNext()
Enumerator | |
---|---|
Success | Top Command executed successfully |
Failure | Top Command would fail |
QueueEmpty | Command queue was empty |
CompositeFailure | Top Command was a CompositeCommand that did not indicate it would fail but failed partway through execution - was reversible |
AwaitingCompletion | Top command was an AsyncCommand that is awaiting completion |
AlreadyRunning | Top command was an AsyncCommand but its task had already been started and hasn't been completed |