tbf/TBF/Rig/Transition.cs

36 lines
937 B
C#
Raw Normal View History

///
/// Copyright (c) 2013-2015 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
2021-10-26 09:23:57 +00:00
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;
}
}
}