SetAllowMutate() public static method

Sets or resets allow mutate flag. If this flag is set, then all automata operations may modify automata given as input; otherwise, operations will always leave input automata languages unmodified. By default, the flag is not set.
public static SetAllowMutate ( bool flag ) : bool
flag bool if true, the flag is set
return bool
Exemplo n.º 1
0
        private Automaton ToAutomatonAllowMutate(IDictionary <string, Automaton> automata, IAutomatonProvider automaton_provider)
        {
            bool b = false;

            if (allow_mutation) // thread unsafe
            {
                b = Automaton.SetAllowMutate(true);
            }
            Automaton a = ToAutomaton(automata, automaton_provider);

            if (allow_mutation)
            {
                Automaton.SetAllowMutate(b);
            }
            return(a);
        }