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

DC_ControlList Class Reference

#include <DC_ControlList.h>

Inheritance diagram for DC_ControlList:

ConditionalPunctualAction PunctualAction CC_RootObject List of all members.

Detailed Description

Encapsulation of list of control blocks.

This control action can be configured with a list of control blocks whose propagate() method is invoked upon execution of the action. This class assumes that the target control blocks are already fully configured.

Control lists offer a reset service. A call to the reset service causes all the target control blocks 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 blocks receiving a propagation request. Subclasses can of course implement different execution checks.

Author:
Roberto Totaro
Version:
1.0

Definition at line 36 of file DC_ControlList.h.

Public Member Functions

 DC_ControlList (void)
 Instantiate a control list.

void setListSize (unsigned int listSize)
 Set the size of the list of control blocks.

unsigned int getListSize (void) const
 Return the size of the list of control blocks.

void setControlBlock (unsigned int i, ControlBlock *item)
 Load the i-th entry in the list of control blocks.

ControlBlockgetControlBlock (unsigned int i) const
 Get the i-th entry in the list of control blocks.

void reset (void)
 Reset all the control blocks.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on the control list: verify that the size of the list of control blocks has a value greater than zero and that all the entries in the list have been loaded with control blocks.


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_ControlList::DC_ControlList void   ) 
 

Instantiate a control list.

The class identifier is set, the size of the control block list is initialized to 0 to signify that the component is not yet configured.

Definition at line 19 of file DC_ControlList.cpp.


Member Function Documentation

bool DC_ControlList::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 63 of file DC_ControlList.cpp.

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

Send a propagate request to the target control block.

This method always returns: "ACTION_SUCCESS"

See also:
ConditionalPunctualAction::doAction
Returns:
always returns ACTION_SUCCESS

Implements ConditionalPunctualAction.

Definition at line 54 of file DC_ControlList.cpp.

ControlBlock * DC_ControlList::getControlBlock unsigned int  i  )  const
 

Get the i-th entry in the list of control blocks.

The index i should lie in the interval [0,N-1] where N is the size of the control block list. No checks are performed on the legality of the index.

Parameters:
i the index of the control block list
Returns:
the item at position i of the control block list

Definition at line 48 of file DC_ControlList.cpp.

unsigned int DC_ControlList::getListSize void   )  const
 

Return the size of the list of control blocks.

See also:
setListSize
Returns:
listSize the size of the control block list size

Definition at line 35 of file DC_ControlList.cpp.

bool DC_ControlList::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on the control list: verify that the size of the list of control blocks has a value greater than zero and that all the entries in the list have been loaded with control blocks.

Returns:
true if the control list is configured, false otherwise.

Reimplemented from CC_RootObject.

Definition at line 76 of file DC_ControlList.cpp.

void DC_ControlList::setControlBlock unsigned int  i,
ControlBlock item
 

Load the i-th entry in the list of control blocks.

Only non-null entries are legal. The index i must lie in the interval [0,N-1] where N is the size of the control block list. Use of illegal values results in the generation of an EVT_ILLEGAL_CL event report.

See also:
TD_EventId
Parameters:
i the index of the control block list
item the item to be added to the list at position i

Definition at line 39 of file DC_ControlList.cpp.

void DC_ControlList::setListSize unsigned int  listSize  ) 
 

Set the size of the list of control blocks.

The list size defines the maximum number of control blocks that can be loaded into this component. A call to this method causes memory for an internal data structure to be allocated. This is an initialization method: it shall be called only once, before the component is used for the first time. It is not legal to set the repository size to 0. The entries in the list are initialized to illegal values to signify that the component is not yet configured.

Parameters:
listSize the size of the control block list size

Definition at line 25 of file DC_ControlList.cpp.


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