use rule table instead a single jump funcfor state machine
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="ISimpleStateMachine"
|
||||
// Project: StgSharp
|
||||
@@ -28,24 +28,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.State
|
||||
{
|
||||
public interface ISimpleStateMachine<TStateNode, TStateLabel, TStateContext>
|
||||
where TStateNode: ISimpleStateMachineNode<TStateLabel, TStateContext>
|
||||
where TStateLabel: unmanaged, Enum
|
||||
where TStateContext: StateContext
|
||||
where TStateNode : ISimpleStateMachineNode<TStateLabel, TStateContext>
|
||||
where TStateLabel : unmanaged, IEquatable<TStateLabel>
|
||||
where TStateContext : StateContext
|
||||
{
|
||||
|
||||
ref readonly TStateNode this[TStateLabel label] { get; }
|
||||
ref readonly TStateNode this[
|
||||
TStateLabel label
|
||||
] { get; }
|
||||
|
||||
ref readonly TStateNode GetCurrentStateNode();
|
||||
|
||||
void Reset();
|
||||
|
||||
bool TryMoveNext(TStateContext ctx);
|
||||
bool TryMoveNext(
|
||||
TStateContext ctx
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user