From 7226a86fa06dfe065a2eec8f1d988b83cf324963 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <quaritsch@ivt.tugraz.at>
Date: Tue, 6 Dec 2022 19:51:19 +0100
Subject: [PATCH] throw exception when using the old declaration report classes

---
 VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs | 7 ++++++-
 .../OutputData/XML/XMLDeclarationReportCompletedVehicle.cs | 2 +-
 .../OutputData/XML/XMLDeclarationReportPrimaryVehicle.cs   | 2 +-
 .../VectoCore/OutputData/XML/XMLDeclarationReport_0_9.cs   | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs
index 37ab455b65..20604bce05 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs
@@ -60,7 +60,12 @@ namespace TUGraz.VectoCore.OutputData.XML
 
 		protected IDictionary<Tuple<MissionType, LoadingType>, double> _weightingFactors;
 
-		public XMLDeclarationReport(IReportWriter writer) : base(writer) { }
+		public XMLDeclarationReport(IReportWriter writer) : base(writer)
+		{
+			throw new NotImplementedException("Use new implementation...");
+		}
+
+		protected XMLDeclarationReport(IReportWriter writer, bool dummy) : base(writer) { }
 
 		public class ResultEntry : IResultEntry
 		{
diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs
index c391c44103..44d3fdaa35 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs
@@ -13,7 +13,7 @@ using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport;
 namespace TUGraz.VectoCore.OutputData.XML {
 	public class XMLDeclarationReportCompletedVehicle : XMLDeclarationReport
 	{
-		public XMLDeclarationReportCompletedVehicle(IReportWriter writer) : base(writer) { }
+		public XMLDeclarationReportCompletedVehicle(IReportWriter writer) : base(writer, true) { }
 
 		public IPrimaryVehicleInformationInputDataProvider PrimaryVehicleReportInputData { get; set; }
 
diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportPrimaryVehicle.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportPrimaryVehicle.cs
index 7644ca2483..af5d2c4f13 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportPrimaryVehicle.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportPrimaryVehicle.cs
@@ -11,7 +11,7 @@ namespace TUGraz.VectoCore.OutputData.XML {
 		protected IXMLVehicleInformationFile VehicleInformationFile;
 
 
-		public XMLDeclarationReportPrimaryVehicle(IReportWriter writer) : base(writer)
+		public XMLDeclarationReportPrimaryVehicle(IReportWriter writer) : base(writer, true)
 		{
 		}
 
diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport_0_9.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport_0_9.cs
index 42425ad00c..9f639ad123 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport_0_9.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport_0_9.cs
@@ -223,7 +223,7 @@ namespace TUGraz.VectoCore.OutputData.XML
 
 
 
-		public XMLDeclarationReport09(IReportWriter writer, IManufacturerReportFactory mrfFactory, ICustomerInformationFileFactory cifFactory) : base(writer)
+		public XMLDeclarationReport09(IReportWriter writer, IManufacturerReportFactory mrfFactory, ICustomerInformationFileFactory cifFactory) : base(writer, true)
 		{
 			_mrfFactory = mrfFactory;
 			_cifFactory = cifFactory;
-- 
GitLab