From 98281dfd36b3d68ba28bbb5fb22ff87a2715acd1 Mon Sep 17 00:00:00 2001
From: "VKMTHD\\franzjosefkober" <franz.josef.kober@ivt.tugraz.at>
Date: Thu, 7 Jul 2022 16:41:50 +0200
Subject: [PATCH] added PEV E4 Component Group

---
 .../ComponentGroup.cs                         | 20 +++++++++++++++++++
 .../IVIFReportFactory.cs                      |  1 +
 .../VIFNinjectModule.cs                       |  2 ++
 3 files changed, 23 insertions(+)

diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/ComponentGroup.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/ComponentGroup.cs
index 2438fcaf0e..21df594884 100644
--- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/ComponentGroup.cs
+++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/ComponentGroup.cs
@@ -207,4 +207,24 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
 		#endregion
 	}
 
+
+	public class PevE4ComponentVIFType : ComponentVIFType
+	{
+		public PevE4ComponentVIFType(IVIFReportFactory vifReportFactory) : base(vifReportFactory) { }
+
+		#region Overrides of ComponentVIFType
+
+		public override XElement GetElement(IDeclarationInputDataProvider inputData)
+		{
+			return new XElement(_vif + XMLNames.Vehicle_Components,
+				new XAttribute(_xsi + "type", "vif:Vehicle_PEV-E4_ComponentsVIFType"),
+				_vifReportFactory.GetElectricMachineType().GetElement(inputData),
+				_vifReportFactory.GetElectricEnergyStorageType().GetElement(inputData),
+				_vifReportFactory.GetAxleWheelsType().GetElement(inputData),
+				_vifReportFactory.GetAuxiliaryPEVType().GetElement(inputData));
+		}
+
+		#endregion
+	}
+
 }
diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs
index 5667876a50..034d133a90 100644
--- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs
+++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/IVIFReportFactory.cs
@@ -31,6 +31,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
 		IXmlTypeWriter GetHevS4ComponentVIFType();
 		IXmlTypeWriter GetPevE2ComponentVIFType();
 		IXmlTypeWriter GetPevE3ComponentVIFType();
+		IXmlTypeWriter GetPevE4ComponentVIFType();
 
 		#endregion
 
diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs
index c493daf9a0..b94bd6bdfb 100644
--- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs
+++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/VehicleInformationFile_0_1/VIFNinjectModule.cs
@@ -57,6 +57,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
 			Bind<IXmlTypeWriter>().To<PevE3ComponentVIFType>().When(AccessedViaVIFFactory)
 				.NamedLikeFactoryMethod((IVIFReportFactory f) => f.GetPevE3ComponentVIFType());
 
+			Bind<IXmlTypeWriter>().To<PevE4ComponentVIFType>().When(AccessedViaVIFFactory)
+				.NamedLikeFactoryMethod((IVIFReportFactory f) => f.GetPevE4ComponentVIFType());
 
 			#endregion
 
-- 
GitLab