DialogEngine class CATDialogTransition

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


public class CATDialogTransition

Class to create a command transition.
Role: A transition 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 CATDialogTransition constructor to create a transition but the CATStateCommand.Addtransition method.
A transition must have at least one source state, a target state which may be NULL, and may be associated with a condition and an action.
Transitions must be created in the CATStateCommand.BuildGraph method.

See also:
CATDialogState, CATStateCondition, CATDiaAction


Method Index


o AddInitialState(CATDialogState*)
Adds a source state to the transition.
o GetAction()
Returns the transition action.
o GetCondition()
Returns the transition condition.
o GetFinalState()
Returns the target state.
o GetInitialState(int)
Returns a source state using the source state index.
o GetInitialStateNumber()
Returns the count of source states.
o GetResourceID()
Retrieves the resource identifier.
o RemoveInitialState(CATDialogState*)
Removes a source state from the transition.
o SetAction(CATDiaAction*)
Sets the transition action.
o SetCondition(CATStateCondition*)
Sets the transition condition.
o SetFinalState(CATDialogState*)
Sets the target state.
o SetResourceID(CATString&)
Sets the resource identifier.

Methods


o AddInitialState
public void AddInitialState(CATDialogState* iState)
Adds a source state to the transition.
Parameters:
iState
The state.
Cyclic reference: A pointer to the state is kept, and AddRef'ed. It is Released at the end of the command before the command destructor call or when the state is removed.
o GetAction
public virtual CATDiaAction * GetAction()const
Returns the transition action.
Role: This action is executed when a transition fires.
Returns:
The action.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetCondition
public virtual CATStateCondition * GetCondition()const
Returns the transition condition.
Role: This condition must evaluate TRUE to make the transition fire.
Returns:
The condition.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetFinalState
public CATDialogState * GetFinalState()const
Returns the target state.
Returns:
The state.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetInitialState
public CATDialogState * GetInitialState(int iIndex=1)
Returns a source state using the source state index.
Role: This method returns the iIndexth source state.
Parameters:
iIndex
The index.
Legal values: iIndex range starts with 1, which is the default. Use
GetInitialStateNumber to get the source state count.
Returns:
The state.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
o GetInitialStateNumber
public int GetInitialStateNumber()
Returns the count of source states.
Role: The count of source states ranges from 1 to n.
Returns:
The source state count.
o GetResourceID
public CATString & GetResourceID()
Retrieves the resource identifier.
Role: This identifier is used to retrieve the Undo/Redo titles in the command message file.
Returns:
The resource identifier.
o RemoveInitialState
public void RemoveInitialState(CATDialogState* iState)
Removes a source state from the transition.
Parameters:
iState
The state.
o SetAction
public virtual void SetAction(CATDiaAction* iAction)
Sets the transition action.
Role: This action is executed when a transition fires.
Since a transition has only one action, successive calls to SetAction for the same transition successively overwrite the action.
Parameters:
iAction
The 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 SetCondition
public virtual void SetCondition(CATStateCondition* iCond)
Sets the transition condition.
Role: This condition must evaluate TRUE to make the transition fire.
Since a transition has only one condition, successive calls to SetCondition for the same transition successively overwrite the condition.
Parameters:
iCond
The 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 SetFinalState
public void SetFinalState(CATDialogState* iState)
Sets the target state.
Role: Since a transition has only one target state, successive calls to SetFinalState for the same transition successively overwrite the target state.
Parameters:
iState
the state.
Cyclic reference: A copy of iState is kept and AddRef'ed. It is Released at the end of the command before the command destructor call or when the state is removed.
Legal values: iState may be set to NULL to cancel a state inherited from the command base class.
o SetResourceID
public void SetResourceID( const CATString& iId)
Sets the resource identifier.
Role: This identifier is used to retrieve the Undo/Redo titles in the command message file.
Parameters:
iId
The resource identifier.

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

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