Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
        /// <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;

        }
Ejemplo n.º 3
0
 public ReplaceIC(ICList icl, UIGates.IC oic, UIGates.IC nic)
 {
     this.icl = icl;
     this.oic = oic;
     this.nic = nic;
 }
Ejemplo n.º 4
0
        public CreateIC(ICList icl, UIGates.IC ic)
        {
            this.icl = icl;
            this.ic = ic;

        }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 public ReplaceIC(ICList icl, UIGates.IC oic, UIGates.IC nic)
 {
     this.icl = icl;
     this.oic = oic;
     this.nic = nic;
 }
Ejemplo n.º 7
0
 public CreateIC(ICList icl, UIGates.IC ic)
 {
     this.icl = icl;
     this.ic  = ic;
 }