All Frameworks  Class Hierarchy  This Framework Previous Next  Index

Class DialogEngine.CATDialogTransition

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---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 SetAction
Sets the transition action.
o GetAction
Returns the transition action.
o SetCondition
Sets the transition condition.
o GetCondition
Returns the transition condition.
o AddInitialState
Adds a source state to the transition.
o RemoveInitialState
Removes a source state from the transition.
o GetInitialStateNumber
Returns the count of source states.
o GetInitialState
Returns a source state using the source state index.
o SetFinalState
Sets the target state.
o GetFinalState
Returns the target state.
o SetResourceID
Sets the resource identifier.
o GetResourceID
Retrieves the resource identifier.

Methods


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 GetAction
public 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 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 GetCondition
public 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 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 RemoveInitialState
public void RemoveInitialState(CATDialogState* iState)
Removes a source state from the transition.
Parameters:
iState
The state.
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 GetInitialState
public CATDialogState* GetInitialState(int iIndex)
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 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 GetFinalState
public CATDialogState* GetFinalState( ) const
Returns the target state.
Returns:
The state.
Lifecycle rules deviation: This method doesn't AddRef the returned value.
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.
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.

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

Copyright © 2000, Dassault Systèmes. All rights reserved.