Class ASequence
Inherited Members
Namespace: Xareus.Scenarios
Assembly: Xareus.Scenarios.dll
Syntax
[Serializable]
public abstract class ASequence : Identifiable
Fields
externalContext
The external context
Declaration
protected IContext externalContext
Field Value
Type | Description |
---|---|
IContext |
scenarioContext
The context of the scenario
Declaration
protected IContext scenarioContext
Field Value
Type | Description |
---|---|
IContext |
Properties
DownstreamTransitions
Calculte the downstream transitions of the sequence
Declaration
public IEnumerable<Transition> DownstreamTransitions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Transition> |
Id
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string |
InitialSequence
Returns the initialSequence object associated to this sequence. Can be null
Declaration
public InitialSequence InitialSequence { get; }
Property Value
Type | Description |
---|---|
InitialSequence |
Scenario
Get the Scenario containing this complex sequence
Declaration
public Scenario Scenario { get; }
Property Value
Type | Description |
---|---|
Scenario |
State
The state of the sequence
Declaration
public SequenceState State { get; set; }
Property Value
Type | Description |
---|---|
SequenceState |
UpstreamTransitions
Calculte the upstream transitions of the sequence
Declaration
public IEnumerable<Transition> UpstreamTransitions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Transition> |
Methods
AddToken(IContext)
Puts a token into this abstract safe Petri net.
Declaration
public abstract void AddToken(IContext token)
Parameters
Type | Name | Description |
---|---|---|
IContext | token | The token |
GetToken()
Gets the token held by this abstract sequence. On a complex sequence, this is the merge of all final places' tokens
Declaration
public abstract IContext GetToken()
Returns
Type | Description |
---|---|
IContext | The token; |
HasReachedFinalState()
Checks whether the net reached its final state.
Declaration
public abstract bool HasReachedFinalState()
Returns
Type | Description |
---|---|
bool |
|
HasToken()
Checks if there is a token somewhere in the sequence.
Declaration
public abstract bool HasToken()
Returns
Type | Description |
---|---|
bool | true is there is a token, false if there is no token |
IsFinal()
Checks if the current ASequence is set as final
Declaration
public bool IsFinal()
Returns
Type | Description |
---|---|
bool |
IsInitial()
Checks if the current ASequence is set as initial
Declaration
public bool IsInitial()
Returns
Type | Description |
---|---|
bool |
RemoveToken()
Consumes the token held by this sequence once for all.
Declaration
public abstract void RemoveToken()
SetFinal(bool)
Sets if the current ASequence is set as final
Declaration
public void SetFinal(bool finaleState)
Parameters
Type | Name | Description |
---|---|---|
bool | finaleState |
SetInitial(bool)
Sets if the current ASequence is set as initial
Declaration
public void SetInitial(bool initialState)
Parameters
Type | Name | Description |
---|---|---|
bool | initialState |