Class ComplexSequence
Inheritance
ComplexSequence
Assembly: Xareus.Scenarios.dll
Syntax
[Serializable]
public abstract class ComplexSequence : ASequence
Constructors
ComplexSequence()
Declaration
ComplexSequence(string, string)
Declaration
public ComplexSequence(string id, string label = "")
Parameters
Type |
Name |
Description |
string |
id |
The Id must be unique
|
string |
label |
The label (optional)
|
Fields
finalSequences
List of the final sub-sequences of the sequence
Declaration
protected List<ASequence> finalSequences
Field Value
initialSequences
List of the initial sub-sequences of the sequence
Declaration
protected Dictionary<ASequence, Function> initialSequences
Field Value
tokenInits
Token inits for the initial sequences
Declaration
protected Dictionary<ASequence, ATokenInit> tokenInits
Field Value
Properties
FinalSequences
List of the final sub-sequences of the sequence
Declaration
protected List<ASequence> FinalSequences { get; }
Property Value
InitialSequences
List of the initial sub-sequences of the sequence
Declaration
protected Dictionary<ASequence, Function> InitialSequences { get; }
Property Value
SequenceTypeName
Declaration
public virtual string SequenceTypeName { get; }
Property Value
TransitionTypeName
Declaration
public virtual string TransitionTypeName { get; }
Property Value
finalSequence
Declaration
public virtual List<Reference> finalSequence { get; set; }
Property Value
initialSequence
Declaration
public virtual List<InitialSequence> initialSequence { get; set; }
Property Value
maxLoop
Declaration
public virtual int maxLoop { get; set; }
Property Value
sequence
Declaration
public virtual List<ASequence> sequence { get; set; }
Property Value
tokenMerge
Declaration
public virtual Function tokenMerge { get; set; }
Property Value
tokenSplit
Declaration
public virtual Function tokenSplit { get; set; }
Property Value
transition
Declaration
public virtual List<Transition> transition { get; set; }
Property Value
Methods
AddSubSequence(ASequence)
Adds a sub sequence to the current complexe sequence
Declaration
public void AddSubSequence(ASequence sequence)
Parameters
AddToken(IContext)
Declaration
public override void AddToken(IContext token)
Parameters
Overrides
AddTransition(Transition)
Adds a transition in the current complexe sequence
Declaration
public void AddTransition(Transition transition)
Parameters
CancelFiringTransitions()
Declaration
public void CancelFiringTransitions()
CreateAndAddSequence(string, string)
Creates and adds a sub sequence to the current complexe sequence
Declaration
public ASequence CreateAndAddSequence(string id, string label = "")
Parameters
Returns
CreateAndAddTransition(string, string)
Creates and adds a transition in the current complexe sequence
Declaration
public virtual Transition CreateAndAddTransition(string id, string label = "")
Parameters
Returns
CreateSubSequence(string, string)
Creates a new sub sequence with the given Id and label
Declaration
public virtual ASequence CreateSubSequence(string id, string label = "")
Parameters
Returns
CreateTransition(string, string)
Creates a new transition with the given Id and label
Declaration
public virtual Transition CreateTransition(string id, string label = "")
Parameters
Returns
EndFireTransition(Transition)
End firing a transition (i.e. add tokens in downstream sequences)
Declaration
protected virtual bool EndFireTransition(Transition transition)
Parameters
Returns
Exceptions
GetAvailableSequenceId(string)
Returns the first available sequence Id in the form of prefix_xxx
Declaration
public string GetAvailableSequenceId(string prefix)
Parameters
Type |
Name |
Description |
string |
prefix |
|
Returns
GetAvailableTransitionId(string)
Returns the first available transition Id in the form of prefix_xxx
Declaration
public string GetAvailableTransitionId(string prefix)
Parameters
Type |
Name |
Description |
string |
prefix |
|
Returns
GetToken()
Get the token of the given complex sequence.
The token is null if at least one final sequence of the net has no token.
The token is the result of the FinalTokenMerge function on all final sequences' tokens
Declaration
public override IContext GetToken()
Returns
Overrides
HasReachedFinalState()
Declaration
public override bool HasReachedFinalState()
Returns
Overrides
HasToken()
Declaration
public override bool HasToken()
Returns
Overrides
IsFinal(string)
Checks if a sequence with the given Id is final to the current complex sequence
Declaration
public virtual bool IsFinal(string finalId)
Parameters
Type |
Name |
Description |
string |
finalId |
|
Returns
IsInitial(string)
Checks if a sequence with the given Id is initial to the current complex sequence
Declaration
public virtual bool IsInitial(string initialId)
Parameters
Type |
Name |
Description |
string |
initialId |
|
Returns
RemoveSubSequence(ASequence)
Removes a sub sequence from the current complexe sequence
Declaration
public virtual void RemoveSubSequence(ASequence sequence)
Parameters
RemoveToken()
Declaration
public override void RemoveToken()
Overrides
RemoveTransition(Transition)
Removes a transition from the current complexe sequence
Declaration
public void RemoveTransition(Transition transition)
Parameters
RenameFinal(string, string)
Renames a final sequence reference
Declaration
public void RenameFinal(string previousId, string newId)
Parameters
RenameInTransitions(string, string)
Renames a sequence in all transitions references
Declaration
public void RenameInTransitions(string previousId, string newId)
Parameters
RenameInitial(string, string)
Renames an initial sequence reference
Declaration
public void RenameInitial(string previousId, string newId)
Parameters
SetFinal(string)
sets the sequence with the given Id as final to the current complex sequence
Declaration
public virtual void SetFinal(string finalId)
Parameters
Type |
Name |
Description |
string |
finalId |
|
SetFinalTokenMerge(AFinalTokenMerge)
Set the final token merge function to use from an existing instance
Declaration
public void SetFinalTokenMerge(AFinalTokenMerge value)
Parameters
SetInitial(string)
sets the sequence with the given Id as initial to the current complex sequence
Declaration
public virtual void SetInitial(string initialId)
Parameters
Type |
Name |
Description |
string |
initialId |
|
SetTokenSplit(ATokenSplit)
Set the token split function to use from an existing instance
Declaration
public void SetTokenSplit(ATokenSplit value)
Parameters
StartFireTransition(Transition)
Start firing a transition (i.e. remove tokens from upstream sequences and execute)
Declaration
protected virtual bool StartFireTransition(Transition transition)
Parameters
Returns
Exceptions
UnsetFinal(string)
unsets the sequence with the given Id as final to the current complex sequence
Declaration
public virtual void UnsetFinal(string finalId)
Parameters
Type |
Name |
Description |
string |
finalId |
|
UnsetInitial(string)
unsets the sequence with the given Id as initial to the current complex sequence
Declaration
public virtual void UnsetInitial(string initialId)
Parameters
Type |
Name |
Description |
string |
initialId |
|
Extension Methods