control::HandlingPattern Class Reference

#include <handling-pattern.hpp>

Inheritance diagram for control::HandlingPattern:

Inheritance graph
[legend]
Collaboration diagram for control::HandlingPattern:

Collaboration graph
[legend]

List of all members.


Detailed Description

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 ProcDispatcher or running the command asynchronously in a background thread. A HandlingPattern first of all describes how to invoke the command operation, but for each pattern it is possible to get a special "undo pattern", which, on activation, will reverse the effect of the basic pattern.

Definition at line 100 of file handling-pattern.hpp.


Public Types

enum  ID {
  SYNC, SYNC_THROW, ASYNC, DUMMY,
  NUM_IDS
}

Public Member Functions

HandlingPattern const & howtoUNDO () const
ExecResult invoke (CommandImpl &command, Symbol name) const
 main functionality: invoke a command, detect errors.
virtual bool isValid () const =0

Static Public Member Functions

static ID defaultID ()
static HandlingPattern const & get (ID id)
 retrieve pre-configured pattern

Protected Member Functions

virtual void exec (CommandImpl &command) const =0
virtual HandlingPattern const & getUndoPatt () const =0
virtual void perform (CommandImpl &command) const =0
virtual void undo (CommandImpl &command) const =0

Member Function Documentation

HandlingPattern const & control::HandlingPattern::get ( ID  id  )  [static]

retrieve pre-configured pattern

Definition at line 45 of file handling-pattern.cpp.

References control::getPatternInstance().

Referenced by control::Command::execSync(), and control::CommandImpl::isValid().

Here is the call graph for this function:

Here is the caller graph for this function:

HandlingPattern const& control::HandlingPattern::howtoUNDO (  )  const [inline]

Returns:
HandlingPattern describing how the UNDO operation is to be performed

Definition at line 129 of file handling-pattern.hpp.

ExecResult control::HandlingPattern::invoke ( CommandImpl command,
Symbol  name 
) const

main functionality: invoke a command, detect errors.

Returns:
ExecResult object, which might later be used to detect errors on execution
Parameters:
name to use in log and error messages
Note:
does error handling, but delegates the actual execution to the protected (subclass) member

Definition at line 55 of file handling-pattern.cpp.

References lib::Literal::c(), lumiera_error(), asset::str(), and lumiera::Error::what().

Referenced by control::Command::exec().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:

Generated on Sun Aug 1 21:32:17 2010 for Lumiera by  doxygen 1.5.6