Example #1
0
        public bool ContainsEntity(string symbol, int inputSignals, int outputSignals, int buses)
        {
            if (!entityTable.ContainsSymbol(symbol))
            {
                return(false);
            }
            ReadOnlyCollection <Entity> entry = entityTable.LookupSymbol(symbol);

            for (int i = 0; i < entry.Count; i++)
            {
                Entity entity = entry[i];
                if ((entity.InputSignals.Length == inputSignals &&
                     entity.OutputSignals.Length == outputSignals &&
                     entity.Buses.Length == buses) || entity.IsGeneric && entity.Buses.Length == buses)
                {
                    return(true);
                }
            }
            return(false);
        }