#include <CommandFrame.hpp>
Inheritance diagram for corelinux::CommandFrame
Public Methods | |
CommandFrame ( bool autoReverse = false ) | |
Default Constructor. | |
CommandFrame ( CommandFrameCref ) throw ( CommandFrameException ) | |
Copy constructor. More... | |
virtual | ~CommandFrame ( void ) |
Virtual destructor. More... | |
CommandFrameRef | operator= ( CommandFrameCref ) throw ( CommandFrameException ) |
Operator assignment. More... | |
bool | operator== ( CommandFrameCref ) const |
Equality operator. | |
WorkState | getState ( void ) const |
Retrieves the state of the frame. More... | |
bool | getReverseFlag ( void ) const |
Retrieves the auto reverse flag. More... | |
virtual void | getCommands ( CommandsRef ) const |
Retrieves the commands into a Command collection. More... | |
CommandFrameRef | operator+= ( AbstractCommandPtr ) throw ( CommandFrameException ) |
Operator overload for adding a command. More... | |
CommandFrameRef | operator+= ( CommandFrameCref ) throw ( CommandFrameException ) |
Operator overload for appending commands from another CommandFrame to the current frame. More... | |
virtual void | addCommand ( AbstractCommandPtr ) throw ( CommandFrameException ) |
Explicit call to add command. More... | |
void | setAutoReverse ( bool ) throw ( CommandFrameException ) |
Sets the auto reverse flag. More... | |
void | execute ( void ) throw ( CommandFrameException ) |
Run the frame which will iterate through the commands, calling execute for each on. More... | |
void | executeReverse ( void ) throw ( CommandFrameException ) |
Run the reverse commands. More... | |
Protected Methods | |
virtual WorkState | executeCommands ( void ) |
Called from execute AFTER the state is set to EXECUTING and a synchronized monitor is created. More... | |
virtual WorkState | executeReverseCommands ( void ) |
Called from executeReverse AFTER the state is set to REVERSING and a synchronized monitor is created. More... | |
Protected Attributes | |
bool | theAutoReverseFlag |
The recovery flag. | |
WorkState | theWorkState |
The state of execution. | |
Commands | theCommands |
The Commands that make up the frame. |
It maintains state and can be flagged to auto recover (reverse) the command effects.
|
Copy constructor.
|
|
Virtual destructor. Clears the colleciton of commands from the list. DOES NOT DESTROY THEM!!! |
|
Explicit call to add command.
|
|
Run the frame which will iterate through the commands, calling execute for each on. The state must be BUILDING, which will change to COMPLETED if all goes well, REVERSED if auto reverse is true and there was a need to roll-back the commands, or NEVERCOMPLETED if auto reverse if false.
|
|
Called from execute AFTER the state is set to EXECUTING and a synchronized monitor is created.
|
|
Run the reverse commands. The state must be COMPLETED for this to work. You can reverse a CommandFrame even if the auto reverse command is off. The state, upon valid completion will be REVERSED or NEVERCOMPLETED in case of error
|
|
Called from executeReverse AFTER the state is set to REVERSING and a synchronized monitor is created.
|
|
Retrieves the commands into a Command collection.
|
|
Retrieves the auto reverse flag.
|
|
Retrieves the state of the frame.
|
|
Operator overload for appending commands from another CommandFrame to the current frame.
|
|
Operator overload for adding a command.
|
|
Operator assignment. The commands from the argument replace the commands in the current CommandFrame.
|
|
Sets the auto reverse flag.
|