using System.Collections.Generic;
using SabreTools.DatFiles;
using SabreTools.IO.Logging;
namespace SabreTools.Reports
{
///
/// Base class for a report output format
///
public abstract class BaseReport
{
#region Logging
///
/// Logging object
///
protected readonly Logger _logger = new();
#endregion
///
/// Set of DatStatistics objects to use for formatting
///
protected List _statistics;
///
/// Create a new report from the filename
///
/// List of statistics objects to set
public BaseReport(List statsList)
{
_statistics = statsList;
}
///
/// Create and open an output file for writing direct from a set of statistics
///
/// Name of the file to write to
/// True if baddumps should be included in output, false otherwise
/// True if nodumps should be included in output, false otherwise
/// True if the error that is thrown should be thrown back to the caller, false otherwise
/// True if the report was written correctly, false otherwise
public abstract bool WriteToFile(string? outfile, bool baddumpCol, bool nodumpCol, bool throwOnError = false);
}
}