From 78506a30b0a71c859b27f495b2534d62c849d2ea Mon Sep 17 00:00:00 2001 From: Harald Martini <harald.martini@student.tugraz.at> Date: Wed, 1 Jun 2022 15:20:04 +0200 Subject: [PATCH] added MockupFollowupSimulatorFactoryCreators --- .../IFollowUpSimulatorFactoryCreator.cs | 4 +- .../MockupFollowUpSimulatorFactoryCreator.cs | 68 +++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 VectoMockup/VectoMockup/Simulation/SimulatorFactory/MockupFollowUpSimulatorFactoryCreator.cs diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory/IFollowUpSimulatorFactoryCreator.cs b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory/IFollowUpSimulatorFactoryCreator.cs index df9125aa06..14718d11ac 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory/IFollowUpSimulatorFactoryCreator.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory/IFollowUpSimulatorFactoryCreator.cs @@ -46,9 +46,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory public class InterimAfterPrimaryFactoryCreator : FollowUpSimulatorFactoryCreator { - private readonly TempFileOutputWriter _currentStageOutputDataWriter = null; + protected readonly TempFileOutputWriter _currentStageOutputDataWriter = null; private readonly IOutputDataWriter _originalReportWriter = null; - private readonly IDeclarationReport _currentStageDeclarationReport = null; + protected IDeclarationReport _currentStageDeclarationReport = null; private readonly IXMLInputDataReader _inputDataReader; private readonly IMultistagePrimaryAndStageInputDataProvider _originalStageInputData; private readonly IDeclarationReport _originalDeclarationReport; diff --git a/VectoMockup/VectoMockup/Simulation/SimulatorFactory/MockupFollowUpSimulatorFactoryCreator.cs b/VectoMockup/VectoMockup/Simulation/SimulatorFactory/MockupFollowUpSimulatorFactoryCreator.cs new file mode 100644 index 0000000000..3cc29b8bf3 --- /dev/null +++ b/VectoMockup/VectoMockup/Simulation/SimulatorFactory/MockupFollowUpSimulatorFactoryCreator.cs @@ -0,0 +1,68 @@ +using System; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCore.InputData.FileIO.XML; +using TUGraz.VectoCore.Models.Simulation; +using TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory; +using TUGraz.VectoCore.OutputData; +using TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9; +using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter; +using TUGraz.VectoMockup.Reports; + +namespace TUGraz.VectoMockup.Simulation.SimulatorFactory +{ + public class MockupInterimAfterPrimaryFactoryCreator : InterimAfterPrimaryFactoryCreator + { + public MockupInterimAfterPrimaryFactoryCreator( + IMultistagePrimaryAndStageInputDataProvider originalStageInputData, IOutputDataWriter originalReportWriter, + IDeclarationReport originalDeclarationReport, + ISimulatorFactoryFactory simFactoryFactory, + IManufacturerReportFactory mrfFactory, + ICustomerInformationFileFactory cifFactory, + IXMLInputDataReader inputDataReader, bool validate) : + base(originalStageInputData, originalReportWriter, originalDeclarationReport, simFactoryFactory, + inputDataReader, validate) + { + _currentStageDeclarationReport = + new XMLDeclarationMockupPrimaryReport(_currentStageOutputDataWriter, mrfFactory, cifFactory, true); + } + + #region Overrides of InterimAfterPrimaryFactoryCreator + + public override ISimulatorFactory GetNextFactory() + { + //throw new NotImplementedException(); + return base.GetNextFactory(); + } + + #endregion + } + + public class MockupCompletedAfterPrimaryFactoryCreator : CompletedAfterInterimPrimaryFactoryCreator + { + public MockupCompletedAfterPrimaryFactoryCreator(IMultistageVIFInputData originalInputData, + IOutputDataWriter originalOutputDataWriter, + IDeclarationReport originalDeclarationReport, + IXMLInputDataReader inputDataReader, + ISimulatorFactoryFactory simulatorFactoryFactory, + bool validate) : + base(originalInputData, + originalOutputDataWriter, + originalDeclarationReport, + inputDataReader, + simulatorFactoryFactory, + validate) + { + + } + + #region Overrides of CompletedAfterInterimPrimaryFactoryCreator + + public override ISimulatorFactory GetNextFactory() + { + return base.GetNextFactory(); + } + + #endregion + } + +} \ No newline at end of file -- GitLab