DialogEngine CATDialogState

Usage: you must use this class as is. You should never derive it.


public class CATDialogState

Class to create a command state.
Role: A state is one of the main elements of a state dialog command which is a state machine that uses states to let the end user input the requested parameters, and transitions between states to process these input parameters and progress in the statechart.
Do not use the CATDialogState constructor to create a state but the and methods.
A state can contain several dialog agents and may be associated with an exit condition, an entry action and an exit action.
States must be created in the method.

See also:
, ,


Constructor and Destructor Index


o ~CATDialogState()

Method Index


o AddDialogAgent(CATCommand*)
Adds a dialog agent in the state.
o GetDialogAgent(int)
Returns an state agent using the agent index.
o GetDialogAgentSize()
Returns the count of agents in the state.
o GetEnterAction()
Returns the entry action.
o GetLeaveAction()
Returns the exit action.
o GetLeaveCondition()
Returns the exit condition.
o GetResourceID()
Returns the resource identifier.
o RemoveDialogAgent(CATCommand*)
Removes a dialog agent in the state.
o SetEnterAction(CATDiaAction*)
Sets the entry action.
o SetLeaveAction(CATDiaAction*)
Sets the exit action.
o SetLeaveCondition(CATStateCondition*)
Sets the exit condition.
o SetResourceID(CATString&)
Sets the resource identifier.

Constructor and Destructor


o ~CATDialogState
public virtual ~CATDialogState()

Methods


o AddDialogAgent
public virtual AddDialogAgent( iAgent)
Adds a dialog agent in the state.
Parameters:
iAgent
The agent to add.
Cyclic reference: A copy of iAgent is kept and AddRef'ed. It is Released at the end of the command before the command destructor call or when the agent is removed.
o GetDialogAgent
public GetDialogAgent( iIndex)
Returns an state agent using the agent index.
Role: This method returns the iIndexth agent.
Parameters:
iIndex
The agent index.
Legal values: iIndex range starts with 1, which is the default. Use
to get the state agent count.
Returns:
The agent.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetDialogAgentSize
public GetDialogAgentSize()
Returns the count of agents in the state.
Role: The count of agents ranges from 1 to n.
Returns:
The agent count.
o GetEnterAction
public virtual GetEnterAction()
Returns the entry action.
Role: This action is executed when entering the state without using a self-transition.
Returns:
The entry action.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetLeaveAction
public virtual GetLeaveAction()
Returns the exit action.
Role: This action is executed when a transition leaves the state if it is not a self-transition.
Returns:
The exit action.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetLeaveCondition
public virtual GetLeaveCondition()
Returns the exit condition.
Role: This condition must evaluate TRUE to trigger a transition.
Returns:
The exit condition.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetResourceID
public GetResourceID()
Returns the resource identifier.
Role: This identifier is used to retrieve the state prompt in the command message file.
Returns:
The resource identifier.
o RemoveDialogAgent
public RemoveDialogAgent( iAgent)
Removes a dialog agent in the state.
Parameters:
iAgent
The agent to remove.
o SetEnterAction
public virtual SetEnterAction( iAction)
Sets the entry action.
Role: This action is executed when entering the state without using a self-transition.
Since a state has only one entry action, successive calls to SetEnterAction for the same state successively overwrite the action.
Parameters:
iAction
The entry action.
Cyclic reference: A copy of iAction is kept and AddRef'ed. It is Released at the end of the command before the command destructor call.
Legal values: iAction may be set to NULL to cancel an action inherited from the command base class.
o SetLeaveAction
public virtual SetLeaveAction( iAction)
Sets the exit action.
Role: This action is executed when a transition leaves the state if it is not a self-transition.
Since a state has only one exit action, successive calls to SetLeaveAction for the same state successively overwrite the action.
Parameters:
iAction
The exit action.
Cyclic reference: A copy of iAction is kept and AddRef'ed. It is Released at the end of the command before the command destructor call.
Legal values: iAction may be set to NULL to cancel an action inherited from the command base class.
o SetLeaveCondition
public virtual SetLeaveCondition( iCond)
Sets the exit condition.
Role: This condition must evaluate TRUE to trigger a transition.
Since a state has only one exit condition, successive calls to SetLeaveCondition for the same state successively overwrite the condition.
Parameters:
iCond
The exit condition.
Cyclic reference: A copy of iCond is kept and AddRef'ed. It is Released at the end of the command before the command destructor call.
Legal values: iCond may be set to NULL to cancel a condition inherited from the command base class.
o SetResourceID
public SetResourceID( const iId)
Sets the resource identifier.
Role: This identifier is used to retrieve the state prompt in the command message file.
Since a state has only one identifier, successive calls to SetResourceId for the same state successively overwrite the identifier. It may be useful to change the state prompt dynamically.
Parameters:
iId
The resource identifier.

This object is included in the file: CATDialogState.h
If needed, your Imakefile.mk should include the module: CATDialogEngine

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.