Example #1
0
        /// <summary>
        /// Finds the element and pin that matched the pin target for this circuit container</summary>
        /// <param name="pinTarget">Contains pin's element and pin index</param>
        /// <param name="inputSide">True for input pin, false for output pin</param>
        /// <returns>Return a pair of element and pin. As an element instance method, if there is a match, the element is self,
        /// and pin is one of its pins defined in Type. If there is no match, both are null.</returns>
        public override Pair <Element, ICircuitPin> MatchPinTarget(PinTarget pinTarget, bool inputSide)
        {
            if (pinTarget == null || pinTarget.InstancingNode != DomNode)
            {
                return(new Pair <Element, ICircuitPin>()); // look no farthur
            }
            var result = Target.Cast <Group>().MatchPinTarget(pinTarget, inputSide);

            if (result.First != null)
            {
                result.First = this;
            }
            return(result);
        }
Example #2
0
 /// <summary>
 /// Finds the element and pin that fully matched the pin target for this circuit container,
 /// including the template instance node</summary>
 /// <param name="pinTarget">Contains pin's element and pin index</param>
 /// <param name="inputSide">True for input pin, false for output pin</param>
 /// <returns>Return a pair of element and pin. As an element instance method, if there is a match, the element is self,
 /// and pin is one of its pins defined in Type. If there is no match, both are null.</returns>
 public override Pair <Element, ICircuitPin> FullyMatchPinTarget(PinTarget pinTarget, bool inputSide)
 {
     return(MatchPinTarget(pinTarget, inputSide));
 }
Example #3
0
 public Pin(Node src, uint pinID, PinDataType typ)
 {
     source = new PinTarget(src, pinID);
     type   = typ;
 }
Example #4
0
 public Pin(uint nodeID, uint pinID, PinDataType typ)
 {
     source = new PinTarget(nodeID, pinID);
     type   = typ;
 }