Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DC_ControlAction Class Reference
[Data Processing]

#include <DC_ControlAction.h>

Inheritance diagram for DC_ControlAction:

ConditionalPunctualAction PunctualAction CC_RootObject List of all members.

Detailed Description

Encapsulation of the conditional propagation of a control block.

A control action has a settable attribute called target control block. A control action is implemented as a conditional punctual action whose execution action consists in sending a propagation request to the target control block. This class assumes that the target control block is already fully configured.

Control actions offer a reset service. A call to the reset service causes the target control block to be reset.

This class implements a default execution check that always returns "can execute". This means that, if the control action is enabled, then its execution will always result in the target control block receiving a propagation request. Subclasses can of course implement different execution checks.

Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 37 of file DC_ControlAction.h.

Public Member Functions

 DC_ControlAction (void)
 Instantiate a control action.

void setTargetControlBlock (ControlBlock *pBlock)
 Load the target control block.

ControlBlockgetTargetControlBlock (void)
 Return the currently loaded target control block.

void reset (void)
 Reset the target control block.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on a control action.


Protected Member Functions

virtual bool canExecute (void)
 Encapsulate an execution check that always returns "control action can execute".

virtual TD_ActionOutcome doConditionalAction (void)
 Send a propagate request to the target control block.


Constructor & Destructor Documentation

DC_ControlAction::DC_ControlAction void   ) 
 

Instantiate a control action.

This method sets the class identifier and initializes the target control block to an illegal value to signify that the component is not yet configured.

Definition at line 18 of file DC_ControlAction.cpp.


Member Function Documentation

bool DC_ControlAction::canExecute void   )  [protected, virtual]
 

Encapsulate an execution check that always returns "control action can execute".

See also:
ConditionalPunctualAction::doAction
Returns:
always returns true.

Implements ConditionalPunctualAction.

Definition at line 29 of file DC_ControlAction.cpp.

TD_ActionOutcome DC_ControlAction::doConditionalAction void   )  [protected, virtual]
 

Send a propagate request to the target control block.

This method always returns: "ACTION_SUCCESS"

See also:
ConditionalPunctualAction::doAction
Returns:
the outcome code of the punctual action

Implements ConditionalPunctualAction.

Definition at line 23 of file DC_ControlAction.cpp.

ControlBlock * DC_ControlAction::getTargetControlBlock void   ) 
 

Return the currently loaded target control block.

Returns:
the target control block that is currently loaded

Definition at line 38 of file DC_ControlAction.cpp.

bool DC_ControlAction::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on a control action.

It is verified that the target control block has been loaded.

Reimplemented from CC_RootObject.

Definition at line 47 of file DC_ControlAction.cpp.

void DC_ControlAction::setTargetControlBlock ControlBlock pBlock  ) 
 

Load the target control block.

Parameters:
pBlock the target control block to be loaded

Definition at line 33 of file DC_ControlAction.cpp.


The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved