openMSX
GlobalSettings.hh
Go to the documentation of this file.
1#ifndef GLOBALSETTINGS_HH
2#define GLOBALSETTINGS_HH
3
4#include "Observer.hh"
5#include "BooleanSetting.hh"
6#include "EnumSetting.hh"
7#include "IntegerSetting.hh"
8#include "StringSetting.hh"
9#include "SpeedManager.hh"
10#include "ThrottleManager.hh"
12#include <memory>
13#include <vector>
14
15namespace openmsx {
16
17class GlobalCommandController;
18
24class GlobalSettings final : private Observer<Setting>
25{
26public:
27 explicit GlobalSettings(GlobalCommandController& commandController);
29
31 return pauseSetting;
32 }
34 return powerSetting;
35 }
37 return autoSaveSetting;
38 }
40 return umrCallBackSetting;
41 }
43 return invalidPsgDirectionsSetting;
44 }
46 return invalidPpiModeSetting;
47 }
49 return resampleSetting;
50 }
51 [[nodiscard]] SpeedManager& getSpeedManager() {
52 return speedManager;
53 }
55 return throttleManager;
56 }
57
58private:
59 // Observer<Setting>
60 void update(const Setting& setting) noexcept override;
61
62private:
63 GlobalCommandController& commandController;
64
65 BooleanSetting pauseSetting;
66 BooleanSetting powerSetting;
67 BooleanSetting autoSaveSetting;
68 StringSetting umrCallBackSetting;
69 StringSetting invalidPsgDirectionsSetting;
70 StringSetting invalidPpiModeSetting;
72 SpeedManager speedManager;
73 ThrottleManager throttleManager;
74};
75
76} // namespace openmsx
77
78#endif
BaseSetting * setting
This class contains settings that are used by several other class (including some singletons).
ThrottleManager & getThrottleManager()
StringSetting & getUMRCallBackSetting()
BooleanSetting & getAutoSaveSetting()
SpeedManager & getSpeedManager()
StringSetting & getInvalidPpiModeSetting()
BooleanSetting & getPowerSetting()
EnumSetting< ResampledSoundDevice::ResampleType > & getResampleSetting()
BooleanSetting & getPauseSetting()
StringSetting & getInvalidPsgDirectionsSetting()
Generic Gang-of-Four Observer class, templatized edition.
Definition Observer.hh:10
Manages the desired ratio between EmuTime and real time.
Manages the throttle state of openMSX.
This file implemented 3 utility functions:
Definition Autofire.cc:11