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