![]() |
Mema
Memory Matrix — multi-channel audio matrix monitor and router
|
XML-backed configuration manager for the Mema.Mo monitor application. More...
#include <MemaMoAppConfiguration.h>
Inheritance diagram for MemaMoAppConfiguration:
Collaboration diagram for MemaMoAppConfiguration:Public Types | |
| enum | TagID { CONNECTIONCONFIG , SERVICEDESCRIPTION , VISUCONFIG , OUTPUTVISUTYPE , METERINGCOLOUR , LOOKANDFEEL } |
| XML element tag identifiers used when serialising/deserialising the configuration. More... | |
| enum | AttributeID { ENABLED , COUNT } |
| XML attribute identifiers used alongside TagID elements. More... | |
Public Member Functions | |
| MemaMoAppConfiguration (const File &file) | |
| Constructs the configuration, loading from or creating the given XML file. | |
| ~MemaMoAppConfiguration () override | |
| bool | isValid () override |
| Returns true when the loaded XML contains all required Mema.Mo configuration nodes. | |
| bool | ResetToDefault () |
| Resets every configuration value to its factory default and triggers a dump. | |
Static Public Member Functions | |
| static juce::String | getTagName (TagID ID) |
| static juce::String | getAttributeName (AttributeID ID) |
| static bool | isValid (const std::unique_ptr< juce::XmlElement > &xmlConfig) |
| Static variant — validates an already-parsed XmlElement without a file on disk. | |
Protected Member Functions | |
| bool | HandleConfigVersionConflict (const Version &configVersionFound) override |
| Called when the persisted config version differs from the current app version. | |
XML-backed configuration manager for the Mema.Mo monitor application.
Persists the user's chosen Mema service (host/port), output visualization type, metering colour, and look-and-feel selection across application launches. Inherits the dump/watch/version-conflict infrastructure from AppConfigurationBase.
Definition at line 41 of file MemaMoAppConfiguration.h.
XML attribute identifiers used alongside TagID elements.
| Enumerator | |
|---|---|
| ENABLED | Boolean flag indicating whether a feature or connection is active. |
| COUNT | Integer storing a channel or item count. |
Definition at line 77 of file MemaMoAppConfiguration.h.
XML element tag identifiers used when serialising/deserialising the configuration.
| Enumerator | |
|---|---|
| CONNECTIONCONFIG | Root element for connection settings (host, port). |
| SERVICEDESCRIPTION | Stores the multicast service descriptor of the last connected Mema instance. |
| VISUCONFIG | Root element for visualisation settings. |
| OUTPUTVISUTYPE | Active output visualisation mode (meterbridge, 2-D field, waveform, …). |
| METERINGCOLOUR | User-selected metering bar colour. |
| LOOKANDFEEL | Active look-and-feel (follow host / dark / light). |
Definition at line 46 of file MemaMoAppConfiguration.h.
|
explicit |
Constructs the configuration, loading from or creating the given XML file.
Definition at line 22 of file MemaMoAppConfiguration.cpp.
References Mema_CONFIG_VERSION.
|
override |
Definition at line 28 of file MemaMoAppConfiguration.cpp.
|
inlinestatic |
Definition at line 82 of file MemaMoAppConfiguration.h.
References COUNT, and ENABLED.
Referenced by MainComponent::onConfigUpdated(), and MainComponent::performConfigurationDump().
|
inlinestatic |
Definition at line 55 of file MemaMoAppConfiguration.h.
References CONNECTIONCONFIG, LOOKANDFEEL, METERINGCOLOUR, OUTPUTVISUTYPE, SERVICEDESCRIPTION, and VISUCONFIG.
Referenced by isValid(), MainComponent::onConfigUpdated(), and MainComponent::performConfigurationDump().
|
overrideprotected |
Called when the persisted config version differs from the current app version.
Definition at line 132 of file MemaMoAppConfiguration.cpp.
References Mema_CONFIG_VERSION, and ResetToDefault().
|
override |
Returns true when the loaded XML contains all required Mema.Mo configuration nodes.
Definition at line 32 of file MemaMoAppConfiguration.cpp.
References isValid().
Referenced by isValid(), and ResetToDefault().
|
static |
Static variant — validates an already-parsed XmlElement without a file on disk.
Definition at line 37 of file MemaMoAppConfiguration.cpp.
References CONNECTIONCONFIG, getTagName(), LOOKANDFEEL, METERINGCOLOUR, OUTPUTVISUTYPE, SERVICEDESCRIPTION, and VISUCONFIG.
| bool MemaMoAppConfiguration::ResetToDefault | ( | ) |
Resets every configuration value to its factory default and triggers a dump.
Definition at line 89 of file MemaMoAppConfiguration.cpp.
References isValid().
Referenced by HandleConfigVersionConflict().