C# Class DataDictionary.Rules.RuleCondition

Inheritance: Generated.RuleCondition, ITextualExplain
Exibir arquivo Open project: ERTMSSolutions/ERTMSFormalSpecs Class Usage Examples

Public Methods

Method Description
AddModelElement ( IModelElement element ) : void

Adds a model element in this model element

CreateDefault ( ICollection enclosingCollection ) : RuleCondition

Creates a default element

CreateStatusMessage ( ) : string

Creates the status message

Evaluate ( DataDictionary.Tests.Runner.Runner runner, acceptor priority, IModelElement instance, HashSet activations, ExplanationPart explanation ) : bool

Evaluates the rule and its sub rules

EvaluatePreConditions ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explanation, DataDictionary.Tests.Runner.Runner runner ) : bool

Provides the actual value for the preconditions

FindAction ( string name ) : Action

Provides the action which corresponds to the name provided

FindPreCondition ( string name ) : PreCondition

Provides the precondition which corresponds to the name provided

FindRule ( string name ) : Rule

Provides the sub rule which corresponds to the name provided

GetExplain ( TextualExplanation explanation, bool explainSubElements ) : void

Builds the explanation of the element

GetModeForTypedElement ( ITypedElement element ) : Usage.ModeEnum

Provides the mode for the typed element provided

Modifies ( ITypedElement variable ) : VariableUpdateStatement

Provides the statement which modifies the variable

Reads ( ITypedElement variable ) : bool

Indicates whether this rule reads the content of this variable

RecoverUpdateInformation ( ) : void

Ensures that all update information has been deleted

RuleCondition ( ) : System

Constructor

SetUpdateInformation ( ModelElement source ) : void

Sets the update information for this rule condition (this rule condition updates source)

Uses ( IVariable variable ) : bool

Indicates whether this rule uses the typed element

duplicate ( ) : RuleCondition

Duplicates this model element

Method Details

AddModelElement() public method

Adds a model element in this model element
public AddModelElement ( IModelElement element ) : void
element IModelElement
return void

CreateDefault() public static method

Creates a default element
public static CreateDefault ( ICollection enclosingCollection ) : RuleCondition
enclosingCollection ICollection
return RuleCondition

CreateStatusMessage() public method

Creates the status message
public CreateStatusMessage ( ) : string
return string

Evaluate() public method

Evaluates the rule and its sub rules
public Evaluate ( DataDictionary.Tests.Runner.Runner runner, acceptor priority, IModelElement instance, HashSet activations, ExplanationPart explanation ) : bool
runner DataDictionary.Tests.Runner.Runner
priority DataDictionary.Generated.acceptor the priority level : a rule can be activated only if its priority level == priority
instance IModelElement The instance on which the rule must be evaluated
activations HashSet
explanation DataDictionary.Interpreter.ExplanationPart The explanation part to be filled
return bool

EvaluatePreConditions() public method

Provides the actual value for the preconditions
public EvaluatePreConditions ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explanation, DataDictionary.Tests.Runner.Runner runner ) : bool
context DataDictionary.Interpreter.InterpretationContext The context on which the precondition must be evaluated
explanation DataDictionary.Interpreter.ExplanationPart The explanation part to fill, if any
runner DataDictionary.Tests.Runner.Runner
return bool

FindAction() public method

Provides the action which corresponds to the name provided
public FindAction ( string name ) : Action
name string
return Action

FindPreCondition() public method

Provides the precondition which corresponds to the name provided
public FindPreCondition ( string name ) : PreCondition
name string
return PreCondition

FindRule() public method

Provides the sub rule which corresponds to the name provided
public FindRule ( string name ) : Rule
name string
return Rule

GetExplain() public method

Builds the explanation of the element
public GetExplain ( TextualExplanation explanation, bool explainSubElements ) : void
explanation TextualExplanation
explainSubElements bool Precises if we need to explain the sub elements (if any)
return void

GetModeForTypedElement() public method

Provides the mode for the typed element provided
public GetModeForTypedElement ( ITypedElement element ) : Usage.ModeEnum
element ITypedElement
return Usage.ModeEnum

Modifies() public method

Provides the statement which modifies the variable
public Modifies ( ITypedElement variable ) : VariableUpdateStatement
variable ITypedElement
return DataDictionary.Interpreter.Statement.VariableUpdateStatement

Reads() public method

Indicates whether this rule reads the content of this variable
public Reads ( ITypedElement variable ) : bool
variable ITypedElement
return bool

RecoverUpdateInformation() public method

Ensures that all update information has been deleted
public RecoverUpdateInformation ( ) : void
return void

RuleCondition() public method

Constructor
public RuleCondition ( ) : System
return System

SetUpdateInformation() public method

Sets the update information for this rule condition (this rule condition updates source)
public SetUpdateInformation ( ModelElement source ) : void
source ModelElement
return void

Uses() public method

Indicates whether this rule uses the typed element
public Uses ( IVariable variable ) : bool
variable IVariable
return bool

duplicate() public method

Duplicates this model element
public duplicate ( ) : RuleCondition
return RuleCondition