C# Class DataDictionary.Types.Type

A type. All types must inherit from this class
Inheritance: Generated.Type, IDefaultValueElement, IGraphicalDisplay
Exibir arquivo Open project: ERTMSSolutions/ERTMSFormalSpecs Class Usage Examples

Public Properties

Property Type Description
castFunction DataDictionary.Functions.Function

Public Methods

Method Description
ApplicableRule ( acceptor priority ) : bool

Indicates that a rule is applicable for this type at the provided priority

CleanCompilation ( ) : void

Clears the expression tree to ensure new compilation

CombineType ( Type right, BinaryExpression Operator ) : Type

Combines two types to create a new one

CompareForEquality ( IValue left, IValue right ) : bool
Compile ( ) : DataDictionary.Interpreter.InterpreterTreeNode

Creates the tree according to the expression text

Contains ( IValue right, IValue left ) : bool
GetExplain ( TextualExplanation explanation, bool explainSubElements ) : void

Builds the explanation of the element

Greater ( IValue left, IValue right ) : bool
IsDouble ( ) : bool

Indicates if the type is double

Less ( IValue left, IValue right ) : bool
Match ( Type otherType ) : bool

Indicates that the other type can be placed in variables of this type

PerformArithmericOperation ( DataDictionary.Interpreter.InterpretationContext context, IValue left, BinaryExpression operation, IValue right ) : IValue

Performs the arithmetic operation based on the type of the result

ValidBinaryOperation ( BinaryExpression operation, Type otherType ) : bool

Indicates that binary operation is valid for this type and the other type

checkValidExpression ( string expression ) : bool

Indicates that the expression is valid for this IExpressionable

convert ( IValue value ) : IValue

Converts a value in this type

getValue ( string image ) : IValue

Gets a value based on its image

Private Methods

Method Description
MatchStateMachines ( StateMachine stateMachineType, DataDictionary.src.UnifiedStateMachine unifiedstateMachineType ) : bool

Checks that the unified state machine includes the state machine and, in that case, indicates that the types match

MatchStructures ( Structure structureType, DataDictionary.src.UnifiedStructure unifiedStructureType ) : bool

Checks that the unified structure includes the structure and, in that case, indicates that the types match

Method Details

ApplicableRule() public method

Indicates that a rule is applicable for this type at the provided priority
public ApplicableRule ( acceptor priority ) : bool
priority DataDictionary.Generated.acceptor
return bool

CleanCompilation() public method

Clears the expression tree to ensure new compilation
public CleanCompilation ( ) : void
return void

CombineType() public method

Combines two types to create a new one
public CombineType ( Type right, BinaryExpression Operator ) : Type
right Type
Operator DataDictionary.Interpreter.BinaryExpression
return Type

CompareForEquality() public method

public CompareForEquality ( IValue left, IValue right ) : bool
left IValue
right IValue
return bool

Compile() public method

Creates the tree according to the expression text
public Compile ( ) : DataDictionary.Interpreter.InterpreterTreeNode
return DataDictionary.Interpreter.InterpreterTreeNode

Contains() public method

public Contains ( IValue right, IValue left ) : bool
right IValue
left IValue
return bool

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

Greater() public method

public Greater ( IValue left, IValue right ) : bool
left IValue
right IValue
return bool

IsDouble() public method

Indicates if the type is double
public IsDouble ( ) : bool
return bool

Less() public method

public Less ( IValue left, IValue right ) : bool
left IValue
right IValue
return bool

Match() public method

Indicates that the other type can be placed in variables of this type
public Match ( Type otherType ) : bool
otherType Type
return bool

PerformArithmericOperation() public method

Performs the arithmetic operation based on the type of the result
public PerformArithmericOperation ( DataDictionary.Interpreter.InterpretationContext context, IValue left, BinaryExpression operation, IValue right ) : IValue
context DataDictionary.Interpreter.InterpretationContext The context used to perform this operation
left IValue
operation DataDictionary.Interpreter.BinaryExpression
right IValue
return IValue

ValidBinaryOperation() public method

Indicates that binary operation is valid for this type and the other type
public ValidBinaryOperation ( BinaryExpression operation, Type otherType ) : bool
operation DataDictionary.Interpreter.BinaryExpression
otherType Type
return bool

checkValidExpression() public method

Indicates that the expression is valid for this IExpressionable
public checkValidExpression ( string expression ) : bool
expression string
return bool

convert() public method

Converts a value in this type
public convert ( IValue value ) : IValue
value IValue The value to convert
return IValue

getValue() public method

Gets a value based on its image
public getValue ( string image ) : IValue
image string
return IValue

Property Details

castFunction public_oe property

A function which allows to cast a value as a new value of this type
public Function,DataDictionary.Functions castFunction
return DataDictionary.Functions.Function