Exemple #1
0
        private void InternalAddPort(Port port)
        {
            int idx = _allPorts.Count;

            _allPorts.Add(port);
            if (_systemMediator != null)
            {
                _systemMediator.NotifyPortAdded(port, idx);
                idx = 0;
                foreach (Signal s in port.InputSignals)
                {
                    if (_allSignals.Contains(s))
                    {
                        _systemMediator.NotifySignalDrivesPort(s, port, idx++);
                    }
                }
                idx = 0;
                foreach (Signal s in port.OutputSignals)
                {
                    if (_allSignals.Contains(s))
                    {
                        _systemMediator.NotifyPortDrivesSignal(s, port, idx++);
                    }
                }
                idx = 0;
                foreach (Bus b in port.Buses)
                {
                    if (_allBuses.Contains(b))
                    {
                        _systemMediator.NotifyBusAttachedToPort(b, port, idx++);
                    }
                }
            }
        }
Exemple #2
0
 public override bool EnterPort(Port port, Signal parent, bool again, bool root)
 {
     if (again)
     {
         return(false);
     }
     _ports.Add(port);
     return(true);
 }
Exemple #3
0
        private void InternalAddPort(Port port)
        {
            int idx = _allPorts.Count;

            _allPorts.Add(port);
            if (_mediator != null)
            {
                _mediator.OnPortAdded(port, idx);
            }
        }