diff --git a/VectoCore/VectoCore/InputData/Reader/VectoRunDataFactoryFactory.cs b/VectoCore/VectoCore/InputData/Reader/VectoRunDataFactoryFactory.cs index a6c47b6b84b75c9f92564085bf40ef196e24571f..87a072b22a81d8ac97ce8c6d574242561214baaf 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>