using System;
using Volpe.Cafe.ModelSettings;
using Volpe.Cafe.Reporting.Generators;

namespace Volpe.Cafe.Reporting.ModelingReports
{
    /// <summary>
    /// Provides support for generating a <b>technology utilization</b> modeling report.
    /// </summary>
    [Serializable]
    public class TechUtilizationReport : ModelingReport
    {
        /// <inheritdoc cref="ModelingReport(string, bool, Func{string[]})"/>
        public TechUtilizationReport(string path, bool append = false)
            : base(path, append, GetHeaders) { }

        /// <inheritdoc/>
        public override ReportDataGenerator GetDataGenerator(
            Scenario scen, ReportingData data, ModelingSettings settings)
        {
            return new TechUtilizationReportDataGenerator(scen, data, settings);
        }

        private static new string[] GetHeaders()
        {
            string headersStr =
                "Scenario,Scenario Name,Model Year,Manufacturer,Reg-Class,Param Type," +
                TechnologyIndexes.TechNamesCSV;

            return headersStr.Split(',');
        }

    }
}
