using System;
using Toolbox.Docking.Api.Units;

namespace Toolbox.Docking.Api.Objects.Calculator
{
    /// <summary>
    /// This class contains the most basic description for a Toolbox calculator.
    /// </summary>
    [Serializable]
    public sealed class TbCalculatorInfo : TbObjectInfo
    {
        /// <summary>
        /// Constructs a calculator info object. 
        /// </summary>
        /// <param name="objFlags">Object information flags</param>
        /// <param name="unit">The Unit that the calculator will return values in</param>
        /// <param name="flags">Toolbox calculator's metadata flags.</param>
        public TbCalculatorInfo(TbObjectInfoFlags objFlags, TbUnit unit, CalculatorFlags flags) : base(objFlags)
        {
            Unit = unit;
            Flags = flags;
        }

        /// <summary>
        /// This is the Unit that the calculator will return values in.
        /// Toolbox calculators should return all calculated values in a single unit.
        /// </summary>
        public readonly TbUnit Unit;

        /// <summary>
        /// Toolbox calculator's metadata flags.
        /// </summary>
        public readonly CalculatorFlags Flags;
    }
}