Exemplo n.º 1
0
        internal static void CloneTransitions(
            FSM srcFsm, int srcState, FSM destFsm, int destState)
        {
            //Clone the transitions from srcState to destState
            Transitions srcTrans = null;

            srcFsm.Trans.TryGetValue(srcState, out srcTrans);
            if (srcTrans == null)
            {
                return;
            }

            Transitions destTrans = null;

            destFsm.Trans.TryGetValue(destState, out destTrans);

            if (destTrans == null)
            {
                destTrans = new Transitions();
                destFsm.Trans.Add(destState, destTrans);
            }

            destTrans.CloneTransitions(srcTrans, srcState, destState);
        }
Exemplo n.º 2
0
        internal int FsmMakeTransition(int prevState, XName inputSymbol, out XName matchingName, out WildCard matchingWildCard)
        {
            Transitions currTrans = this.ValidationStates.Trans[prevState];

            return(currTrans.GetNextState(inputSymbol, out matchingName, out matchingWildCard));
        }
Exemplo n.º 3
0
 internal void Add(WildCard wildCard, int nextState)
 {
     Transitions.Add <WildCard>(ref this.wildCardTransitions, wildCard, nextState);
 }
Exemplo n.º 4
0
 internal void Add(XName name, int nextState)
 {
     Transitions.Add <XName>(ref this.nameTransitions, name, nextState);
 }