private void DuplicateLocationHinting(UIGates.IC target) { // duplicate the location hinting foreach (KeyValuePair <Gates.AbstractGate, GateLocation> hint in locationHints) { int cidx = ((Gates.IC)_gate).Circuit.IndexOf(hint.Key); target.locationHints.Add(((Gates.IC)target.AbGate).Circuit[cidx], hint.Value); } }
/// <summary> /// The "template" here is used as a visual template, that is, a descriptor of /// how the terminals should be laid out and a provided of location hints. /// The IC becomes the actual circuit within the return value. /// Accordingly, it is assumed that the template will be of the same /// "type" as the IC. /// </summary> /// <param name="ic"></param> /// <param name="template"></param> /// <returns></returns> public static IC CreateFromTemplate(Gates.IC ic, IC template) { UIGates.IC nuic = new UIGates.IC(ic, template.CloneTerminals()); template.DuplicateLocationHinting(nuic); return nuic; }
public ReplaceIC(ICList icl, UIGates.IC oic, UIGates.IC nic) { this.icl = icl; this.oic = oic; this.nic = nic; }
public CreateIC(ICList icl, UIGates.IC ic) { this.icl = icl; this.ic = ic; }
/// <summary> /// The "template" here is used as a visual template, that is, a descriptor of /// how the terminals should be laid out and a provided of location hints. /// The IC becomes the actual circuit within the return value. /// Accordingly, it is assumed that the template will be of the same /// "type" as the IC. /// </summary> /// <param name="ic"></param> /// <param name="template"></param> /// <returns></returns> public static IC CreateFromTemplate(Gates.IC ic, IC template) { UIGates.IC nuic = new UIGates.IC(ic, template.CloneTerminals()); template.DuplicateLocationHinting(nuic); return(nuic); }