package fabrik.simulator.pic16f84;

import fabrik.simulator.pic16f84.interfaces.*;

public abstract class PICComponent {
    DataRegisterInterface dataRegister;
    EEPROMInterface eeprom;
    PreScalerInterface preScaler;
    IOPortInterface ioPorts;
    TimerInterface timer;
    InterruptInterface interrupts;
    TableInterface table;
    FrontendControllerInterface frontendController;
    WatchdogTimerInterface watchdogTimer;
    ProgramStackInterface programStack;
    CommandInterface commands;
    ExecutionTimeSubject executionTime;
    ToggleButtonInterface toggleButtonExt;

    public void initialize(PICComponentLocator locator) {
        toggleButtonExt = locator.getComponent(ToggleButtonInterface.class);
        dataRegister = locator.getComponent(DataRegisterInterface.class);
        eeprom = locator.getComponent(EEPROMInterface.class);
        ioPorts = locator.getComponent(IOPortInterface.class);
        preScaler = locator.getComponent(PreScalerInterface.class);
        timer = locator.getComponent(TimerInterface.class);
        interrupts = locator.getComponent(InterruptInterface.class);
        frontendController = locator.getComponent(FrontendControllerInterface.class);
        watchdogTimer = locator.getComponent(WatchdogTimerInterface.class);
        programStack = locator.getComponent(ProgramStackInterface.class);
        commands = locator.getComponent(CommandInterface.class);
        table = locator.getComponent(TableInterface.class);
        executionTime = locator.getComponent(ExecutionTimeSubject.class);
    }
}
