using Toolbox.Docking.Api.Control;
using Toolbox.Docking.Api.Units;

namespace Toolbox.Docking.Api.Objects.Calculator
{
    /// <summary>
    /// Factory for constructing a Toolbox calculator object.
    /// </summary>
    public interface ITbCalculatorFactory : ITbObjectFactory
    {
        /// <summary>
        /// This is the scale definition for the Unit that the calculator will return values in.
        /// <see cref="ITbCalculator.Calculate"/> shall return all values in a single, consistent unit:
        ///   for TbRatioScale the same as BaseUnit of this scale (or convertable for system scales);
        ///   for TbQualitativeScale the calculated unit must be member of this scale.
        /// </summary>
        TbScale ScaleDeclaration { get; }

        /// <summary>
        /// Description of the calculator.
        /// </summary>
        CalculatorFlags CalculatorFlags { get; }

        /// <summary>
        /// Returns an initialized, ready to use Toolbox calculator.
        /// </summary>
        /// <param name="task">Task responsible for the object initialization</param>
        /// <returns>
        /// The initialized Toolbox calculator.
        /// </returns>
        ITbCalculator GetCalculator(ITbWorkTask task);
    }
}