/// <summary> /// Return a copy of this object. /// </summary> /// <returns>A new copy of the object is returned.</returns> public LabelMap Clone() { LabelMap p = new LabelMap(); p.Copy(this); return(p); }
/// <summary> /// Copy the source object. /// </summary> /// <param name="src">Specifies the source data.</param> public void Copy(LabelMap src) { m_rgItems = new List <LabelMapItem>(); foreach (LabelMapItem item in src.item) { m_rgItems.Add(item.Clone()); } }
/// <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 LabelMap FromProto(RawProto rp) { LabelMap p = new LabelMap(); RawProtoCollection col = rp.FindChildren("item"); foreach (RawProto child in col) { LabelMapItem item = LabelMapItem.FromProto(child); p.item.Add(item); } return(p); }