예제 #1
0
        public void setOperator(string name)
        {
            ICompoundOperator op;

            if (!mOperators.TryGetValue(name, out op))
            {
                throw new NullReferenceException("can not find " + name + "operator!");
            }
            mCurrentOperator = op;
            mCurrentOperator.reset();
        }
예제 #2
0
 public void RegisterOperator(string name, ICompoundOperator operatorAction)
 {
     if (mOperators.ContainsKey(name))
     {
         throw new Exception("The operator: " + name + "was exist! ");
     }
     if (operatorAction == null)
     {
         throw new NullReferenceException("The operator is null. in " + "CompoundManager:RegisterOperator()");
     }
     mOperators[name] = operatorAction;
 }
예제 #3
0
 public void setOperatorNull()
 {
     mCurrentOperator = null;
 }