using System; using System.Collections.Generic; using System.Text; using Cosmos.HAL.Devices; namespace Cosmos.HAL { public abstract class DeviceMgr { protected readonly List mAll = new List(); protected readonly IList mAllRO; public IList All { get { return mAllRO; } } public DeviceMgr() { mAllRO = mAll.AsReadOnly(); } protected Processor mProcessor; public Processor Processor { get { return mProcessor; } } public void Add(Devices.Device aDevice) { mAll.Add(aDevice); if (aDevice is Processor) { mProcessor = (Processor)aDevice; } } } }