All Frameworks  Class Hierarchy  This Framework  Previous  Indexes

DialogEngine Class CATStateCondition

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATStateCondition
 

Usage: you can derive this class.


public class CATStateCondition

Base class to create a condition.
Role: Conditions are used to check whether the dialog can go on. A condition may be


To create a condition, you can derive this class and override the GetStatus method or use the CATStateCommand.Condition method and give as argument the address of a method to evaluate the condition.
Conditions must be created in the CATStateCommand.BuildGraph method.
See also:
CATDialogState, CATDialogTransition


Constructor and Destructor Index


o CATStateCondition()
Constructs an empty condition.
o ~CATStateCondition()

Method Index


o GetStatus()
Evaluates the condition.
o SetData(void*)
Sets data which may be useful to evaluate the condition.
o SetMethod(ConditionMethod)
Sets the method to evaluate the condition.

Constructor and Destructor


o CATStateCondition
public CATStateCondition()
Constructs an empty condition.
Role: Use it only when deriving the CATStateCondition class, otherwise use the CATStateCommand.Condition method to create a condition.
o ~CATStateCondition
public virtual ~CATStateCondition()

Methods


o GetStatus
public virtual CATBoolean GetStatus()
Evaluates the condition.
Role: Redefine this method when deriving CATStateCondition.
Returns:
The result of the condition evaluation.
o SetData
public HRESULT SetData(void* iData)
Sets data which may be useful to evaluate the condition.
Role: This data will be given as the argument of the ConditionMethod method.
Do not use this method if you derive the CATStateCondition class.
Parameters:
iData
An object that can be useful for the condition.
Warning: A copy of iData is kept. Deallocate this object only at end of the command.
Returns:
An HRESULT. S_OK is always returned.
o SetMethod
public HRESULT SetMethod(ConditionMethod iMeth)
Sets the method to evaluate the condition.
Role: This method must be a method of the CATStateCommand object which defines the statechart.
Do not use SetMethod if you derive the CATStateCondition class.
Parameters:
iMeth
The method which evaluates the condition.
Returns:
An HRESULT. S_OK is always returned.

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

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