public static NetPin Copy(NetPin other) { NetPin result = null; if (other is NetInpin) { result = new NetInpin(); } else if (other is NetOutpin) { result = new NetOutpin(); } else { throw new ArgumentException("Unexpected type in NetPin.Copy()"); } //result.m_instanceNameKey = other.m_instanceNameKey; result.InstanceName = other.InstanceName; //result.m_slicePortKey = other.m_slicePortKey; result.SlicePort = other.SlicePort; result.TileName = other.TileName; result.SliceName = other.SliceName; result.Code = other.Code; return(result); }
/// <summary> /// Add inpin and outpins /// </summary> /// <param name="pin"></param> public void Add(NetPin pin) { if (m_netPins == null) { m_netPins = new List <NetPin>(); } m_netPins.Add(pin); }
public override bool Equals(object obj) { if (!(obj is NetPin)) { return(false); } NetPin other = (NetPin)obj; return (InstanceName == other.InstanceName && SlicePort == other.SlicePort && GetDirection().Equals(other.GetDirection())); }