Ejemplo n.º 1
0
        private void SetFlushToPC(Computer pc)
        {
            // find avaliable flushSpot
            bool find = false;

            foreach (var fl in m_flushes)
            {
                if (fl.Capacity() < m_cellSize)
                {
                    pc.ResetFlush(fl);
                    find = true;
                }
            }
            if (!find)
            { // create new fluch
                var newFlush = new FlushSpot();
                pc.ResetFlush(newFlush);
                m_flushes.Add(newFlush);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Remove itself from previous flush
 /// and set to new flush
 /// </summary>
 public void ResetFlush(FlushSpot flush = null)
 {
     m_flush?.RemovePC(this);
     flush?.AddPc(this.m_input);
     m_flush = flush;
 }