From 2c0648acde825baa17d2072d89c70e7eed395d74 Mon Sep 17 00:00:00 2001
From: Harald Martini <harald.martini@student.tugraz.at>
Date: Tue, 3 May 2022 16:56:52 +0200
Subject: [PATCH] added VectoMockUpRunDataFactoryFactory

---
 .../Reader/VectoRunDataFactoryFactory.cs      | 76 +++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/VectoCore/VectoCore/InputData/Reader/VectoRunDataFactoryFactory.cs b/VectoCore/VectoCore/InputData/Reader/VectoRunDataFactoryFactory.cs
index a6c47b6b84..87a072b22a 100644
--- a/VectoCore/VectoCore/InputData/Reader/VectoRunDataFactoryFactory.cs
+++ b/VectoCore/VectoCore/InputData/Reader/VectoRunDataFactoryFactory.cs
@@ -8,6 +8,82 @@ using TUGraz.VectoCore.OutputData;
 
 namespace TUGraz.VectoCore.InputData.Reader
 {
+	public class VectoMockUpRunDataFactoryFactory : IVectoRunDataFactoryFactory
+	{
+		#region Implementation of IVectoRunDataFactoryFactory
+
+
+
+		public IVectoRunDataFactory CreateDeclarationRunDataFactory(IInputDataProvider inputDataProvider, IDeclarationReport report,
+			IVTPReport vtpReport)
+		{
+			if (inputDataProvider == null)
+				throw new ArgumentNullException(nameof(inputDataProvider));
+
+			switch (inputDataProvider)
+			{
+				case IVTPDeclarationInputDataProvider vtpProvider:
+					return CreateRunDataReader(vtpProvider, vtpReport);
+				case ISingleBusInputDataProvider singleBusProvider:
+					return CreateRunDataReader(singleBusProvider, report);
+				case IDeclarationInputDataProvider declDataProvider:
+					return CreateRunDataReader(declDataProvider, report);
+				case IMultistageVIFInputData multistageVifInputData:
+					return CreateRunDataReader(multistageVifInputData, report);
+				default:
+					break;
+			}
+			throw new VectoException("Unknown InputData for Declaration Mode!");
+		}
+
+		private IVectoRunDataFactory CreateRunDataReader(IMultistageVIFInputData multistageVifInputData, IDeclarationReport report)
+		{
+			throw new NotImplementedException();
+		}
+
+		private IVectoRunDataFactory CreateRunDataReader(IDeclarationInputDataProvider declDataProvider, IDeclarationReport report)
+		{
+			var vehicleCategory = declDataProvider.JobInputData.Vehicle.VehicleCategory;
+			if (vehicleCategory.IsLorry())
+			{
+				return new DeclarationModeTruckVectoRunDataFactory(declDataProvider, report);
+			}
+
+			if (vehicleCategory.IsBus())
+				throw new NotImplementedException();
+				switch (declDataProvider.JobInputData.Vehicle.VehicleCategory)
+				{
+					case VehicleCategory.HeavyBusCompletedVehicle:
+						return new DeclarationModeCompletedBusVectoRunDataFactory(declDataProvider, report);
+					case VehicleCategory.HeavyBusPrimaryVehicle:
+						return new DeclarationModePrimaryBusVectoRunDataFactory(declDataProvider, report);
+					default:
+						break;
+				}
+
+			throw new Exception(
+				$"Could not create RunDataFactory for Vehicle Category{vehicleCategory}");
+		}
+
+		private IVectoRunDataFactory CreateRunDataReader(ISingleBusInputDataProvider singleBusProvider, IDeclarationReport report)
+		{
+			throw new NotImplementedException();
+		}
+
+		private IVectoRunDataFactory CreateRunDataReader(IVTPDeclarationInputDataProvider vtpProvider, IVTPReport vtpReport)
+		{
+			throw new NotImplementedException();
+		}
+
+		public IVectoRunDataFactory CreateEngineeringRunDataFactory(IEngineeringInputDataProvider inputDataProvider)
+		{
+			throw new NotImplementedException();
+		}
+
+		#endregion
+	}
+
+
     public class VectoRunDataFactoryFactory : IVectoRunDataFactoryFactory
 	{
 		/// <summary>
-- 
GitLab