Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit e307d5bf authored by Harald MARTINI's avatar Harald MARTINI
Browse files

Added IMultistagePrimaryAndStageInputDataProvider (for Special Case I & II)

parent 4c5f13a4
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,13 @@ namespace TUGraz.VectoCommon.InputData
new IDeclarationMultistageJobInputData JobInputData { get; }
}
public interface IMultistagePrimaryAndStageInputDataProvider : IInputDataProvider
{
IVehicleDeclarationInputData PrimaryVehicle { get; }
IVehicleDeclarationInputData StageInputData { get; }
}
public interface IDeclarationMultistageJobInputData
{
IPrimaryVehicleInformationInputDataProvider PrimaryVehicle { get; }
......
......@@ -1124,7 +1124,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
}
public class JSONInputDataV10_PrimaryAndStageInputBus : JSONFile, IInputDataProvider
public class JSONInputDataV10_PrimaryAndStageInputBus : JSONFile, IInputDataProvider, IMultistagePrimaryAndStageInputDataProvider
{
private readonly IXMLInputDataReader _xmlInputReader;
private string _primaryVehicleInputDataPath;
......@@ -1136,6 +1136,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
private string _stageInputDataPath;
private IVehicleDeclarationInputData _stageInputData;
public IVehicleDeclarationInputData StageInputData =>
_stageInputData ?? (_stageInputData =
_xmlInputReader.CreateDeclaration(_stageInputDataPath).JobInputData.Vehicle);
......@@ -1168,5 +1169,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
throw new VectoException("unsupported vehicle file format {0}", path);
}
}
#region Implementation of IDeclarationInputDataProvider
public IDeclarationJobInputData JobInputData => throw new NotImplementedException();
public IPrimaryVehicleInformationInputDataProvider PrimaryVehicleData => throw new NotImplementedException();
#endregion
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment