Files

26 lines
817 B
C#

///
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Various.TankWithLevelMsrmnt
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(8); } }
public override string ToString() { return ClassName; }
public IComponent DummyComponent() { return new Tank(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Tank(cfg); }
public IComponentCfg DefaultConfig() { return new TankCfg(this.GetType().Namespace.Substring(16), this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(TankCfg.Serializer, component, this);
}
}
}