Class ASequence
Inherited Members
Namespace: Xareus.Scenarios
Assembly: Xareus.Scenarios.dll
Syntax
[Serializable]
public abstract class ASequence : Identifiable
Fields
ConfigurationParameters
Declaration
protected Dictionary<string, Parameter> ConfigurationParameters
Field Value
Type | Description |
---|---|
Dictionary<string, Parameter> |
Properties
Contexts
The contexts this sequence holds
Declaration
public ContextHolder Contexts { get; set; }
Property Value
Type | Description |
---|---|
ContextHolder |
DownstreamTransitions
Calculte the downstream transitions of the sequence
Declaration
public IEnumerable<Transition> DownstreamTransitions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Transition> |
Functions
Get all the functions used in this sequence
Declaration
public abstract IEnumerable<Function> Functions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Function> | The functions used in the sequence |
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 |
LocalFunctions
Get all the functions that are local to this sequence
Declaration
public abstract IEnumerable<Function> LocalFunctions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Function> |
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 |
SubSequences
Get all the sub-sequences of this sequence
Declaration
public abstract IEnumerable<ASequence> SubSequences { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ASequence> | The sub-sequences |
UpstreamTransitions
Calculte the upstream transitions of the sequence
Declaration
public IEnumerable<Transition> UpstreamTransitions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Transition> |
configuration
Declaration
public virtual Function configuration { get; set; }
Property Value
Type | Description |
---|---|
Function |
Methods
AddToken(IContext)
Puts a token into this abstract sequence.
Declaration
public abstract void AddToken(IContext token)
Parameters
Type | Name | Description |
---|---|---|
IContext | token | The token |
Configure()
Apply the configuration. During this step, the configuration context of the parent sequence is used to create the configuration context of the current sequence The Configuration context used by the function comes from the parent sequence of the current sequence The Configuration context returned by the function is used by the current sequence
Declaration
public virtual void Configure()
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 virtual bool IsFinal()
Returns
Type | Description |
---|---|
bool |
IsInitial()
Checks if the current ASequence is set as initial
Declaration
public virtual bool IsInitial()
Returns
Type | Description |
---|---|
bool |
RemoveToken()
Consumes the token held by this sequence once for all.
Declaration
public abstract void RemoveToken()
SetConfiguration(AConfiguration)
Set the configuration function to use from an existing configuration instance
Declaration
public void SetConfiguration(AConfiguration value)
Parameters
Type | Name | Description |
---|---|---|
AConfiguration | value |
SetConfigurationParameters(Dictionary<string, Parameter>)
Sets/Updates the configuration parameters of the sequence.
Declaration
public virtual void SetConfigurationParameters(Dictionary<string, Parameter> parameters)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, Parameter> | parameters |
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 |