using IStation.Epanet.Enums;
|
|
namespace IStation.Epanet.Network.IO.Output
|
{
|
|
///<summary>Abstract class with factory for INP and XLSX composers.</summary>
|
public abstract class OutputComposer
|
{
|
|
///<summary>Composer creation method.</summary>
|
/// <param name="net">Hydraulic network reference.</param>
|
/// <param name="type">Composer type.</param>
|
/// <returns>Composer reference.</returns>
|
public static OutputComposer Create(Network net, FileType type)
|
{
|
switch (type)
|
{
|
case FileType.INP_FILE: return new InpComposer(net);
|
}
|
return null;
|
}
|
|
protected readonly Network _net;
|
|
/// <param name="net">Hydraulic network reference.</param>
|
protected OutputComposer(Network net) { _net = net; }
|
|
///<summary>Abstract method to implement the output file creation.</summary>
|
/// <param name="fileName">File name reference.</param>
|
public abstract void Compose(string fileName);
|
|
}
|
|
}
|