Finished Design Patterns

This commit is contained in:
2025-05-29 02:05:45 +02:00
parent 52d6352334
commit 47c2ca7d36
4 changed files with 153 additions and 32 deletions

View File

@ -4,9 +4,8 @@ import java.util.HashSet;
import java.util.Set;
import fabrik.simulator.pic16f84.interfaces.ExecutionTimeObserver;
import fabrik.simulator.pic16f84.interfaces.PICComponentInterface;
public abstract class ExecutionTimeSubject extends PICComponent implements PICComponentInterface{
public abstract class ExecutionTimeSubject extends PICComponent{
private Set<ExecutionTimeObserver> observers;
public ExecutionTimeSubject(){

View File

@ -2,20 +2,20 @@ 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 abstract class PICComponent implements PICComponentInterface{
protected DataRegisterInterface dataRegister;
protected EEPROMInterface eeprom;
protected PreScalerInterface preScaler;
protected IOPortInterface ioPorts;
protected TimerInterface timer;
protected InterruptInterface interrupts;
protected TableInterface table;
protected FrontendControllerInterface frontendController;
protected WatchdogTimerInterface watchdogTimer;
protected ProgramStackInterface programStack;
protected CommandInterface commands;
protected ExecutionTimeSubject executionTime;
protected ToggleButtonInterface toggleButtonExt;
public void initialize(PICComponentLocator locator) {
toggleButtonExt = locator.getComponent(ToggleButtonInterface.class);