/** @copydoc LayerParameterBase::Clone */ public override LayerParameterBase Clone() { EluParameter p = new EluParameter(); p.Copy(this); return(p); }
/** @copydoc LayerParameterBase::Copy */ public override void Copy(LayerParameterBase src) { base.Copy(src); if (src is EluParameter) { EluParameter p = (EluParameter)src; m_dfAlpha = p.m_dfAlpha; } }
/** @copydoc LayerParameterBase::Load */ public override object Load(System.IO.BinaryReader br, bool bNewInstance = true) { RawProto proto = RawProto.Parse(br.ReadString()); EluParameter p = FromProto(proto); if (!bNewInstance) { Copy(p); } return(p); }
/// <summary> /// Parses the parameter from a RawProto. /// </summary> /// <param name="rp">Specifies the RawProto to parse.</param> /// <returns>A new instance of the parameter is returned.</returns> public static EluParameter FromProto(RawProto rp) { string strVal; EluParameter p = new EluParameter(); if ((strVal = rp.FindValue("alpha")) != null) { p.alpha = double.Parse(strVal); } return(p); }
/// <summary> /// Parses the parameter from a RawProto. /// </summary> /// <param name="rp">Specifies the RawProto to parse.</param> /// <returns>A new instance of the parameter is returned.</returns> public static new EluParameter FromProto(RawProto rp) { string strVal; EluParameter p = new EluParameter(); ((EngineParameter)p).Copy(EngineParameter.FromProto(rp)); if ((strVal = rp.FindValue("alpha")) != null) { p.alpha = ParseDouble(strVal); } return(p); }
/** @copydoc LayerParameterBase::Copy */ public override void Copy(LayerParameterBase src) { EluParameter p = (EluParameter)src; m_dfAlpha = p.m_dfAlpha; }