using System;
using System.Collections.Generic;
using System.Text;

namespace FormulaEditor
{
    /// <summary>
    /// Brackets detector
    /// </summary>
    public class BracketsDetector : IOperationDetector
    {
        /// <summary>
        /// Singleton
        /// </summary>
        public static readonly BracketsDetector Object = new BracketsDetector();

        /// <summary>
        /// Constructor
        /// </summary>
        protected BracketsDetector()
        {
        }

        #region IOperationDetector Members

        public IOperationAcceptor Detect(MathSymbol s)
        {
            if (s is BracketsSymbol)
            {
                return new ElementaryBrackets();
            }
            return null;
        }

        #endregion
    }
}
