Fixed problem in DeviceSettings::strParam, returned wrong string
[avr-sim.git] / src / HardwareFactory.h
blob2841f236c4dc3b1bde0cc0ca725b330d404c1ac9
1 #ifndef AVR_HARDWAREFACTORY_H
2 #define AVR_HARDWAREFACTORY_H
4 namespace avr {
6 class Bus;
7 class Hardware;
8 class HardwareSettings;
10 /**
11 * @author Tom Haber
12 * @date Apr 26, 2008
13 * @brief Factory for the internal devices.
15 * A factory for creating internal devices based on their name.
17 class HardwareFactory {
18 public:
19 /**
20 * Build an internal device with name \e name and
21 * settings \e hws
23 static Hardware *build(const char *name,
24 HardwareSettings & hws, Bus & bus);
26 private:
27 static Hardware *buildEeprom(HardwareSettings & hws, Bus & bus);
28 static Hardware *buildPort(HardwareSettings & hws, Bus & bus);
29 static Hardware *buildTimer8(HardwareSettings & hws, Bus & bus);
30 static Hardware *buildTimer16(HardwareSettings & hws, Bus & bus);
31 static Hardware *buildTimerIrq(HardwareSettings & hws, Bus & bus);
32 static Hardware *buildUsart(HardwareSettings & hws, Bus & bus);
33 static Hardware *buildSpi(HardwareSettings & hws, Bus & bus);
34 static Hardware *buildADC(HardwareSettings & hws, Bus & bus);
39 #endif /*AVR_HARDWAREFACTORY_H*/