/// <summary> /// Creates a deep copy of this constant /// </summary> /// <returns></returns> public override Oilfield_Constant Clone() { LDF_Constant tmp = new LDF_Constant(); tmp.Name = this.Name; tmp.Unit = this.Unit; tmp.Value = this.Value; tmp.Description = this.Description; return(tmp); }
/// <summary> /// Sets the LDF parameter by name, adding a new parameter if necessary /// Note that parameters represent the EBCDIC lines - any other paramenter beyond 40 will /// not be saved. /// </summary> /// <param name="name">Constant name</param> /// <param name="unit">Constant unit</param> /// <param name="value">Constant value</param> /// <param name="value">Description</param> public override void SetParameter(string name, string unit, string value, string description) { foreach (LDF_Constant c in Parameters) { if (c.Name != name) { continue; } c.Value = value; return; } LDF_Constant newP = new LDF_Constant(name, unit, value, description); Parameters.Add(newP); }