Index: Riskeer/Piping/src/Riskeer.Piping.Data/Probabilistic/PartialProbabilisticPipingOutput.cs =================================================================== diff -u --- Riskeer/Piping/src/Riskeer.Piping.Data/Probabilistic/PartialProbabilisticPipingOutput.cs (revision 0) +++ Riskeer/Piping/src/Riskeer.Piping.Data/Probabilistic/PartialProbabilisticPipingOutput.cs (revision 1ae80053660205589e62dcbcab805d470c8644eb) @@ -0,0 +1,86 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Riskeer.Common.Data.IllustrationPoints; + +namespace Riskeer.Piping.Data.Probabilistic +{ + /// + /// This class contains the result of a sub-calculation for a . + /// + public class PartialProbabilisticPipingOutput : ICloneable + { + /// + /// Creates a new instance of . + /// + /// The reliability of the calculation. + /// The general result of this output with the + /// fault tree illustration points. + public PartialProbabilisticPipingOutput(double reliability, + GeneralResult generalResult) + { + Reliability = reliability; + GeneralResult = generalResult; + } + + /// + /// Gets the reliability of the calculation. + /// + public double Reliability { get; } + + /// + /// Gets the value indicating whether the output contains a general result with illustration points. + /// + public bool HasGeneralResult + { + get + { + return GeneralResult != null; + } + } + + /// + /// Gets the general result with the fault tree illustration points. + /// + public GeneralResult GeneralResult { get; private set; } + + /// + /// Clears the illustration points of the output. + /// + public void ClearIllustrationPoints() + { + GeneralResult = null; + } + + public object Clone() + { + var clone = (PartialProbabilisticPipingOutput) MemberwiseClone(); + + if (GeneralResult != null) + { + clone.GeneralResult = (GeneralResult) GeneralResult.Clone(); + } + + return clone; + } + } +} \ No newline at end of file