An action that can be done or undone with an ActionQueue.
More...
List of all members.
Public Member Functions |
| Action () |
| Creates a new action.
|
| Action (SimpleAction doAction, SimpleAction undoAction) |
| Creates a new action with behavior defined by a pair of delegates.
|
Protected Member Functions |
virtual void | PerformInit () |
| Override this method to do initialization.
|
virtual void | OnBeforeFirstDo () |
| Override this method to run code before the first call to Do.
|
virtual void | PerformDo () |
| Override this method to provide logic for the action, OR specify a delegate in the constructor. Overriding this method without calling the base method will cause the delegate to not be invoked.
|
virtual void | PerformUndo () |
| Override this method to provide logic for the action, OR specify a delegate in the constructor. Overriding this method without calling the base method will cause the delegate to not be invoked.
|
virtual TAction | tryToCombine (TAction olderAction) |
| Override this method if this action can be combined with another action to create an action that is inclusive of both. The two objects must be the same exact concrete type unless combinedActionMustBeSameType is overridden to return true. Return null to indicate that the objects could not be combined.
|
void | OnCombined (TAction newerAction) |
| Called when an action is combined with a newer action.
|
Properties |
TQ | Queue [get, set] |
| The owning queue.
|
ActionState | State [get, set] |
| The state of the action.
|
abstract string | Text [get] |
| Gets the description of this action.
|
internal virtual bool | combinedActionMustBeSameType [get] |
| Override this proprety and return false if this action can be combined with actions of other types. The value returned by combineActionMustBeSameType for the OLDER action is not taken into consideration.
|
Detailed Description
template<TQ, TAction>
class Romulus::ActionQueue-g< TQ, TAction >::Action
An action that can be done or undone with an ActionQueue.
Constructor & Destructor Documentation
template<TQ , TAction >
Romulus.ActionQueue-g< TQ, TAction >.Action.Action |
( |
SimpleAction |
doAction, |
|
|
SimpleAction |
undoAction | |
|
) |
| | |
Creates a new action with behavior defined by a pair of delegates.
- Parameters:
-
| doAction | The delegate defining the do action. |
| undoAction | The delegate defining the undo action. |
Member Function Documentation
template<TQ , TAction >
virtual void Romulus.ActionQueue-g< TQ, TAction >.Action.OnBeforeFirstDo |
( |
|
) |
[protected, virtual] |
Override this method to run code before the first call to Do.
template<TQ , TAction >
void Romulus.ActionQueue-g< TQ, TAction >.Action.OnCombined |
( |
TAction |
newerAction |
) |
[protected] |
Called when an action is combined with a newer action.
- Parameters:
-
Override this method to provide logic for the action, OR specify a delegate in the constructor. Overriding this method without calling the base method will cause the delegate to not be invoked.
Override this method to do initialization.
Override this method to provide logic for the action, OR specify a delegate in the constructor. Overriding this method without calling the base method will cause the delegate to not be invoked.
template<TQ , TAction >
virtual TAction Romulus.ActionQueue-g< TQ, TAction >.Action.tryToCombine |
( |
TAction |
olderAction |
) |
[protected, virtual] |
Override this method if this action can be combined with another action to create an action that is inclusive of both. The two objects must be the same exact concrete type unless combinedActionMustBeSameType is overridden to return true. Return null to indicate that the objects could not be combined.
- Parameters:
-
- Returns:
Property Documentation
template<TQ , TAction >
internal virtual bool Romulus.ActionQueue-g< TQ, TAction >.Action.combinedActionMustBeSameType [get, protected] |
Override this proprety and return false if this action can be combined with actions of other types. The value returned by combineActionMustBeSameType for the OLDER action is not taken into consideration.
Gets the description of this action.
The documentation for this class was generated from the following file:
- D:/VS/Romulus/RomulusPublic/ActionQueue.cs