#include <CmdUtils.h>
Abort an abortable command sequence.
- Parameters
| sequence | the sequence to be aborted. |
- Returns
- kSuccess if the sequence was successfully aborted, other ErrorCode otherwise.
- Postcondition
- don't access the sequence again after calling this method.
| static IAbortableCmdSeq* CmdUtils::BeginAbortableCmdSeq | ( | const char * | trackingData = nullptr | ) | |
| static |
| static ICommandSequence* CmdUtils::BeginCommandSequence | ( | const char * | trackingData = nullptr | ) | |
| static |
Create a command of the given class.
- Parameters
| cmdType | identifies the command to be created. |
- Returns
- command on success, nil otherwise.
| static void CmdUtils::EnableBusyCursor | ( | bool16 | bEnable | ) | |
| static |
Turn on or off automatic busy cursor support during commands and sequences.
- Parameters
| bEnable | kTrue to turn on (the default) or kFalse to turn off busy cursor. |
End auto undo sequence
- Parameters
- Returns
- ErrorCode
End a regular command sequence;
- Parameters
- Returns
- kSuccess if the sequence ended successfully, other ErrorCode otherwise.
- See Also
- ErrorUtils::PMGetGlobalErrorCode
End an abortable command sequence.
- Parameters
- Returns
- kSuccess if the sequence ended successfully, other ErrorCode otherwise.
- Postcondition
- don't access the sequence again after calling this method.
| static ErrorCode CmdUtils::ExecuteCommand | ( | ICommand * | cmd | ) | |
| static |
Private; for internal use only: Execute a command
| static ErrorCode CmdUtils::ExecuteDynamicCommand | ( | ICommand * | cmd | ) | |
| static |
DEPRICATED Avoid using this function if possible - this is legacy and is deprecated.
Execute a dynamic command
- Parameters
| cmd | the command to be processed. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
| static ErrorCode CmdUtils::ExecuteDynamicCommand | ( | ICommand * | cmd, | | | bool16 | isActive | | ) | | |
| static |
DEPRICATED Avoid using this function if possible - this is legacy and is deprecated.
Execute a dynamic command
- Parameters
| cmd | the command to be processed. |
| isActive | - pass kFalse to get notification only from the command, eg. when a tracker is in wireframe mode |
- Returns
- kSuccess on success, other ErrorCode otherwise.
| static int32 CmdUtils::GetMaxStackHeight | ( | | ) | |
| static |
Return the maximum sequence length.
- Returns
- the maximum sequence length.
| static bool16 CmdUtils::IsBusyCursorEnabled | ( | | ) | |
| static |
Is automatic busy cursor support on or off.
- Parameters
- Returns
- bool16 kTrue if busy cursor support is turned on (the default), or kFalse if off
| static bool8 CmdUtils::IsCommandLWProcessed | ( | ICommand * | cmd | ) | |
| static |
Private; for internal use only: Returns kTrue if a command was light-weight processed
| static ErrorCode CmdUtils::LWProcessCommand | ( | ICommand * | cmd | ) | |
| static |
Private; for internal use only: Light-weight process a command
| static ErrorCode CmdUtils::ProcessCommand | ( | ICommand * | cmd | ) | |
| static |
Process a command using regular cmd processing, the default method for cmd execution; remember to check the ErrorCode returned by this call, if you continue to process commands while the global error code is set then protective shutdown will occur.
- Parameters
| cmd | the command to be processed. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
- See Also
- ErrorUtils::PMGetGlobalErrorCode
Flush the command queue, processing scheduled commands
- Parameters
| downToPriority | controls the priority level that commands are processed down to. Commands with this priority and higher will be processed. |
- Returns
- kTrue if all scheduled commands in the command queue could be processed down to the priority specified without any errors, or kFalse otherwise
| static ErrorCode CmdUtils::RollBackCommandSequence | ( | const IAbortableCmdSeq * | sequence, | | | SequenceMark | upToMark = SequenceMark() | | ) | | |
| static |
Roll back an abortable command sequence to a particular sequence mark.
- Precondition
- CmdUtils::SetSequenceMark was used to set the mark.
- Parameters
| sequence | to be rolled back. |
| upToMark | sequennce mark to roll back to. |
Schedule a command to be processed later (depending on their priority)
- Parameters
| cmd | the command to be processed. |
| priority | at which the scheduled command should be processed. |
- Returns
- kSuccess if the command is scheduled for processing, other ErrorCode otherwise.
| static SequenceMark CmdUtils::SetSequenceMark | ( | const IAbortableCmdSeq * | sequence | ) | |
| static |
Mark a point in an abortable command sequence to roll back to later on before the sequence is ended or aborted.
- Parameters
| sequence | in which you want to set the mark |
- Returns
- 0 on failure, sequence mark value otherwise