tbf/TBF/Rig/Transition.cs
2021-03-05 16:12:24 +01:00

36 lines
937 B
C#

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
namespace TBF.Rig
{
public class Transition
{
public Event Evnt;
public State NextState; /// if not null, nextState reference is used
public string NextStateLabel; /// otherwise nextStateLabel is used
/// <summary>
/// Constructor using a next state reference
/// </summary>
public Transition(Event evnt, State nextState)
{
this.Evnt = evnt;
this.NextState = nextState;
this.NextStateLabel = null;
}
/// <summary>
/// Constructor using a next state label
/// </summary>
public Transition(Event evnt, string nextStateLabel)
{
this.Evnt = evnt;
this.NextState = null;
this.NextStateLabel = nextStateLabel;
}
}
}