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

DC_NestedFsmActivatorWithEndState Class Reference

#include <DC_NestedFsmActivatorWithEndState.h>

Inheritance diagram for DC_NestedFsmActivatorWithEndState:

DC_NestedFsmActivator FsmState CC_RootObject List of all members.

Detailed Description

FsmState that activates an FSM.

This FsmState is useful to implement "nested FSM" where one outer FSM controls one or more "inner" FSMs. In this case, to each FsmState of the outer FSM, one of the inner FSMs is associated. The task of the FsmStates is to activate their associated FSMs. This class can be used to implement one of these FsmStates.

A DC_NestedFsmActivatorWithEndState is configured with two parameters: the target FSM and the target state index. The target FSM is the FSM that the FsmState controls and must periodically activate. The continuation action of an DC_NestedFsmActivatorWithEndState consists in activating the target FSM.

The FsmState activates the target FSM until it has reached the target state. At that point, the FsmState terminates. In other words, the termination check of an DC_NestedFsmActivator returns "terminated" when the taregt FSM has reached the target state.

The initialization action of the DC_NestedFsmActivatorWithEndState is implemented to reset the target FSM.

See also:
CC_FSM

DC_NestedFsmActivator

Author:
Alessandro Pasetti (P&P Software GmbH)

R. Totaro

Version:
1.1

Definition at line 48 of file DC_NestedFsmActivatorWithEndState.h.

Public Member Functions

 DC_NestedFsmActivatorWithEndState (void)
 Set the class identifier.

void setTargetState (TD_FsmStateIndex targetState)
 Set the target state index.

TD_FsmStateIndex getTargetState (void)
 Get the target state index.

virtual bool isFinished (void)
 Return true if the target FSM has reached the target state.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check: verify that the base class is configured and that the target state has been loaded.


Constructor & Destructor Documentation

DC_NestedFsmActivatorWithEndState::DC_NestedFsmActivatorWithEndState void   ) 
 

Set the class identifier.

The target state is initialized to an illegal value to signify that the object is not yet configured.

Definition at line 18 of file DC_NestedFsmActivatorWithEndState.cpp.


Member Function Documentation

TD_FsmStateIndex DC_NestedFsmActivatorWithEndState::getTargetState void   ) 
 

Get the target state index.

See also:
isFinished

Definition at line 28 of file DC_NestedFsmActivatorWithEndState.cpp.

bool DC_NestedFsmActivatorWithEndState::isFinished void   )  [virtual]
 

Return true if the target FSM has reached the target state.

See also:
FsmState::isFinished
Returns:
true if the target FSM has reached the target state

Reimplemented from FsmState.

Definition at line 33 of file DC_NestedFsmActivatorWithEndState.cpp.

bool DC_NestedFsmActivatorWithEndState::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check: verify that the base class is configured and that the target state has been loaded.

Returns:
true if the object is configured, false otherwise.

Reimplemented from DC_NestedFsmActivator.

Definition at line 38 of file DC_NestedFsmActivatorWithEndState.cpp.

void DC_NestedFsmActivatorWithEndState::setTargetState TD_FsmStateIndex  targetState  ) 
 

Set the target state index.

See also:
isFinished

Definition at line 23 of file DC_NestedFsmActivatorWithEndState.cpp.


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