12 #include "Commands/Command.h"
13 #include "Commands/InstantCommand.h"
57 void _Initialize()
override;
78 Command* m_chosenCommand =
nullptr;
bool IsFinished() override
Returns whether this command is finished.
Definition: ConditionalCommand.cpp:73
This command will execute once, then finish immediately afterward.
Definition: InstantCommand.h:22
ConditionalCommand(Command *onTrue, Command *onFalse=new InstantCommand())
Creates a new ConditionalCommand with given onTrue and onFalse Commands.
Definition: ConditionalCommand.cpp:22
virtual bool Condition()=0
The Condition to test to determine which Command to run.
void _Cancel() override
This works like cancel(), except that it doesn't throw an exception if it is a part of a command grou...
Definition: ConditionalCommand.cpp:65
The Command class is at the very core of the entire command framework.
Definition: Command.h:52
A ConditionalCommand is a Command that starts one of two commands.
Definition: ConditionalCommand.h:41
void Interrupted() override
Called when the command ends because somebody called cancel() or another command shared the same requ...
Definition: ConditionalCommand.cpp:78