using System.Collections.Generic;
using Deltares.DamEngine.Calculators.KernelWrappers.Common;
using Deltares.DamEngine.Data.General.Results;
using Deltares.DamEngine.Data.Standard.Logging;
namespace Deltares.DamEngine.Calculators.KernelWrappers.Interfaces
{
///
/// Result of the Prepare method
/// Successful : the input data was created susccesfully
/// Failed : the input data could not be created
/// NotRelevant: the DamKernelInput contains data that is not a relevant input for this mechanism
///
public enum PrepareResult
{
Successful,
Failed,
NotRelevant
};
///
/// Interface to implement external failure mechanisms
///
interface IKernelWrapper
{
///
/// Prepares the failure mechanism input based on general dam kernel input.
///
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
///
/// Result of the prepare
///
PrepareResult Prepare(DamKernelInput damKernelInput, out IKernelDataInput kernelDataInput, out IKernelDataOutput kernelDataOutput);
///
/// Validates the kernel data input.
///
/// The kernel data input.
/// The kernel data output.
/// The messages.
///
/// Number of errors that prevent a calculation
///
int Validate(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages);
///
/// Performs a failure mechanism calculation based on the input.
///
/// The kernel data input.
/// The kernel data output.
/// The messages.
void Execute(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages);
///
/// Fills the dam result based on the kernel output.
///
/// The dam kernel input.
/// The kernel data output.
/// The result message.
/// The design result.
void PostProcess(DamKernelInput damKernelInput, IKernelDataOutput kernelDataOutput, string resultMessage, out DesignResult designResult);
}
}