![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "steam/control/handling-pattern.hpp"
Interface: Operation Skeleton how to invoke or undo a command.
Concrete implementations may be retrieved by ID; they range from just invoking the command operations straight forward to dispatching with the SteamDispatcher or running the command asynchronously in a background thread.
Definition at line 87 of file handling-pattern.hpp.
Public Types | |
| enum | ID { SYNC , SYNC_THROW , ASYNC , DUMMY , NUM_IDS } |
Static Public Member Functions | |
| static ID | defaultID () |
| static HandlingPattern const & | get (ID id) |
| retrieve the pre-configured pattern | |
Public Member Functions | |
| virtual | ~HandlingPattern () |
| this is an interface | |
| ExecResult | exec (CommandImpl &command, string) const |
| main functionality: invoke a command, detect errors. | |
| ExecResult | undo (CommandImpl &command, string) const |
| likewise invoke the configured UNDO operation | |
| operator bool () const | |
| virtual bool | isValid () const =0 |
Protected Member Functions | |
| virtual void | performExec (CommandImpl &command) const =0 |
| virtual void | performUndo (CommandImpl &command) const =0 |
Private Types | |
| typedef void(HandlingPattern::* | Action) (CommandImpl &) const |
Private Member Functions | |
| ExecResult | invoke (CommandImpl &, string id, Action) const |
|
inlinevirtual |
this is an interface
Definition at line 90 of file handling-pattern.hpp.
|
private |
Definition at line 126 of file handling-pattern.hpp.
| Enumerator | |
|---|---|
| SYNC | |
| SYNC_THROW | |
| ASYNC | |
| DUMMY | |
| NUM_IDS | |
Definition at line 92 of file handling-pattern.hpp.
Definition at line 101 of file handling-pattern.hpp.
References HandlingPattern::DUMMY.
|
static |
retrieve the pre-configured pattern
Definition at line 38 of file handling-pattern.cpp.
Referenced by CommandUse2_test::check_ThrowOnError(), HandlingPatternBasics_test::checkExec(), HandlingPatternBasics_test::checkUndo(), Command::exec(), Command::execSync(), WrappedStandardExeBuilder::invokeOriginalBuilder(), CommandImpl::isValid(), Command::undo(), and CommandCloneBuilder_test::verifySeparation().
Here is the caller graph for this function:
|
inline |
main functionality: invoke a command, detect errors.
| string | id of the command for error logging |
Definition at line 134 of file handling-pattern.hpp.
References HandlingPattern::invoke(), and HandlingPattern::performExec().
Here is the call graph for this function:
|
inline |
likewise invoke the configured UNDO operation
Definition at line 140 of file handling-pattern.hpp.
References HandlingPattern::invoke(), and HandlingPattern::performUndo().
Here is the call graph for this function:
|
inlineexplicit |
Definition at line 117 of file handling-pattern.hpp.
References HandlingPattern::isValid().
Here is the call graph for this function:Implemented in BasicHandlingPattern, InvokeSyncNoThrow, InvokeSyncThrow, InvokeAsync, CustomHandler, and SimulatedCommandHandler.
Referenced by CommandImpl::isValid(), and HandlingPattern::operator bool().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in BasicHandlingPattern, InvokeSyncNoThrow, InvokeSyncThrow, InvokeAsync, CustomHandler, and SimulatedCommandHandler.
Referenced by HandlingPattern::exec().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in BasicHandlingPattern, InvokeSyncNoThrow, InvokeSyncThrow, InvokeAsync, CustomHandler, and SimulatedCommandHandler.
Referenced by HandlingPattern::undo().
Here is the caller graph for this function:
|
private |
dispatch to the desired operation, with error handling
Definition at line 46 of file handling-pattern.cpp.
References cStr(), and lumiera_error().
Referenced by HandlingPattern::exec(), and HandlingPattern::undo().
Here is the call graph for this function:
Here is the caller graph for this function:
Inheritance diagram for HandlingPattern:
Collaboration diagram for HandlingPattern: