Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 33641a94 authored by Harald MARTINI's avatar Harald MARTINI
Browse files

derive XMLDeclaratioNReport09 from XMLDeclarationReport

parent d0e9faeb
No related branches found
No related tags found
No related merge requests found
......@@ -7,42 +7,41 @@ using TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9.CIFWriter;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9;
using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter;
namespace TUGraz.VectoCore.OutputData.XML
{
public class XMLDeclarationReport09 : IDeclarationReport
public class XMLDeclarationReport09 : XMLDeclarationReport
{
private readonly IReportWriter _writer;
private readonly IManufacturerReportFactory _mrfFactory;
private readonly ICustomerInformationFileFactory _cifFactory;
private IXMLManufacturerReport _manufacturerReport;
private IXMLCustomerReport _customerReport;
#region Implementation of IDeclarationReport
public XMLDeclarationReport09(IReportWriter writer, IManufacturerReportFactory mrfFactory, ICustomerInformationFileFactory cifFactory)
public XMLDeclarationReport09(IReportWriter writer, IManufacturerReportFactory mrfFactory, ICustomerInformationFileFactory cifFactory) : base(writer)
{
_writer = writer;
_mrfFactory = mrfFactory;
_cifFactory = cifFactory;
}
public void InitializeReport(VectoRunData modelData, List<List<FuelData.Entry>> fuelModes)
protected override void InstantiateReports(VectoRunData modelData)
{
var vehicleData = modelData.VehicleData.InputData;
var iepc = vehicleData.Components.IEPC != null;
var ihpc =
vehicleData.Components.ElectricMachines?.Entries?.Count(e => e.ElectricMachine.IHPCType != "None") > 0;
_manufacturerReport = _mrfFactory.GetManufacturerReport(vehicleData.VehicleCategory,
ManufacturerRpt = _mrfFactory.GetManufacturerReport(vehicleData.VehicleCategory,
vehicleData.VehicleType,
vehicleData.ArchitectureID,
vehicleData.ExemptedVehicle,
iepc,
ihpc);
_customerReport = _cifFactory.GetCustomerReport(vehicleData.VehicleCategory,
CustomerRpt = _cifFactory.GetCustomerReport(vehicleData.VehicleCategory,
vehicleData.VehicleType,
vehicleData.ArchitectureID,
vehicleData.ExemptedVehicle,
......@@ -50,18 +49,9 @@ namespace TUGraz.VectoCore.OutputData.XML
ihpc);
}
public void PrepareResult(LoadingType loading, Mission mission, int fuelMode, VectoRunData runData)
{
throw new System.NotImplementedException();
}
public void AddResult(LoadingType loadingType, Mission mission, int fuelMode, VectoRunData runData,
IModalDataContainer modData)
{
throw new System.NotImplementedException();
}
#endregion
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment