|
pwfengine
|
Implements the command-pattern design technique for asynchronous operations. NOTE: The action is disposable. More...
#include <PAction.h>
Public Types | |
| enum | StatusType { StatusSuccess, StatusFailure, StatusNone } |
Public Slots | |
| virtual void | start () |
| virtual void | stop () |
Signals | |
| void | started () |
| void | finished (PAction *action) |
| void | finished (PAction::StatusType finishedStatus) |
| void | success (PAction *action) |
| void | success (PAction::StatusType successStatus) |
| void | failure (PAction *action) |
| void | failure (PAction::StatusType failureStatus) |
Public Member Functions | |
| PAction (QObject *parent=0) | |
| PAction::StatusType | finishedStatus () const |
| bool | hasFinished () const |
Protected Slots | |
| void | finish (const PAction::StatusType &status, const bool &asyncSignal=false) |
Friends | |
| class | PActionPrivate |
Implements the command-pattern design technique for asynchronous operations. NOTE: The action is disposable.
The action can be started with the start() method, stopped with stop() that will asynchronously finish with the StatusNone status. Anyway, the finished signals are emitted when the action finishes.
If still active, the action will be automatically stopped at destruction time.
| enum PAction::StatusType |
| void PAction::failure | ( | PAction::StatusType | failureStatus | ) | [signal] |
The signal be connected to a finished slot of another action
| void PAction::finish | ( | const PAction::StatusType & | status, |
| const bool & | asyncSignal = false |
||
| ) | [protected, slot] |
| asyncSignal | if true asynchronously emit the finished signals, allowing listeners to connect even if them are emitted before the object is returned to the handler |
| void PAction::finished | ( | PAction::StatusType | finishedStatus | ) | [signal] |
The signal be connected to a finish slot of another action
| bool PAction::hasFinished | ( | ) | const |
| void PAction::start | ( | ) | [virtual, slot] |
Start the execution of the action and immediately emit the started signal.
Reimplemented in PAttemptSchema, PEvalWrapperRequire, and PFindSchemaElement.
| void PAction::started | ( | ) | [signal] |
Set the error from another action Directly set the error
| void PAction::stop | ( | ) | [virtual, slot] |
Stop the execution of the action, asynchronously finishing with a StatusNone status.
| void PAction::success | ( | PAction::StatusType | successStatus | ) | [signal] |
The signal be connected to a finish slot of another action
1.7.4