38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
|
|
using System.Collections.Generic;
|
|||
|
|
|
|||
|
|
namespace TBF.BenchControl.Generic
|
|||
|
|
{
|
|||
|
|
public interface IComponentFactory
|
|||
|
|
{
|
|||
|
|
string ClassName { get; } /// Name of the class of components (for instance "Valve")
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Max. number of components of this class in the system: 1, some integer value or int.MaxValue
|
|||
|
|
/// </summary>
|
|||
|
|
int MaxCount { get; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Returns the default configuration
|
|||
|
|
/// </summary>
|
|||
|
|
IComponentCfg DefaultConfig(IList<Entities.Component> components);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Returns the UserControl used inside ComponentConfigForm to display and edit the configuration
|
|||
|
|
/// </summary>
|
|||
|
|
IComponentCfgCtrl CreateCfgCtrl();
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Returns the component
|
|||
|
|
/// </summary>
|
|||
|
|
IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Converts an Entities.Component object into an instance of an appropriate class implementing IComponentCfg
|
|||
|
|
/// </summary>
|
|||
|
|
IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component);
|
|||
|
|
|
|||
|
|
|
|||
|
|
void ResetStaticProperties();
|
|||
|
|
}
|
|||
|
|
}
|