![]() |
Mema
Memory Matrix — multi-channel audio matrix monitor and router
|
XML-backed application configuration manager for the Mema audio matrix tool. More...
#include <MemaAppConfiguration.h>
Inheritance diagram for Mema::MemaAppConfiguration:
Collaboration diagram for Mema::MemaAppConfiguration:Public Types | |
| enum | TagID { PROCESSORCONFIG , DEVCONFIG , UICONFIG , PLUGINCONFIG , INPUTMUTES , OUTPUTMUTES , CROSSPOINTGAINS , PLUGINPARAM } |
| XML element tag identifiers used when serialising/deserialising the configuration. More... | |
| enum | AttributeID { ENABLED , POST , PALETTESTYLE , METERINGCOLOR , IDX , CONTROLLABLE } |
| XML attribute identifiers used alongside TagID elements. More... | |
Public Member Functions | |
| MemaAppConfiguration (const File &file) | |
| Constructs the configuration, loading from or creating the given XML file. | |
| ~MemaAppConfiguration () override | |
| bool | isValid () override |
| Returns true when the loaded XML contains all required configuration nodes. | |
| bool | ResetToDefault () |
| Resets every value to factory defaults 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. | |
Protected Member Functions | |
| bool | HandleConfigVersionConflict (const Version &configVersionFound) override |
| Called when the persisted config version differs from the current app version. | |
XML-backed application configuration manager for the Mema audio matrix tool.
Definition at line 33 of file MemaAppConfiguration.h.
XML attribute identifiers used alongside TagID elements.
Definition at line 75 of file MemaAppConfiguration.h.
XML element tag identifiers used when serialising/deserialising the configuration.
Definition at line 38 of file MemaAppConfiguration.h.
|
explicit |
Constructs the configuration, loading from or creating the given XML file.
Definition at line 24 of file MemaAppConfiguration.cpp.
References Mema_CONFIG_VERSION.
|
override |
Definition at line 30 of file MemaAppConfiguration.cpp.
|
inlinestatic |
Definition at line 84 of file MemaAppConfiguration.h.
References CONTROLLABLE, ENABLED, IDX, METERINGCOLOR, PALETTESTYLE, and POST.
Referenced by Mema::MemaProcessor::createStateXml(), Mema::MemaUIComponent::createStateXml(), isValid(), Mema::MemaUIComponent::setStateXml(), and Mema::MemaProcessor::setStateXml().
|
inlinestatic |
Definition at line 49 of file MemaAppConfiguration.h.
References CROSSPOINTGAINS, DEVCONFIG, INPUTMUTES, OUTPUTMUTES, PLUGINCONFIG, PLUGINPARAM, PROCESSORCONFIG, and UICONFIG.
Referenced by Mema::MemaProcessor::createStateXml(), Mema::MemaUIComponent::createStateXml(), isValid(), Mema::Mema::Mema(), Mema::Mema::onConfigUpdated(), Mema::Mema::performConfigurationDump(), Mema::MemaUIComponent::setStateXml(), and Mema::MemaProcessor::setStateXml().
|
overrideprotected |
Called when the persisted config version differs from the current app version.
Definition at line 149 of file MemaAppConfiguration.cpp.
References Mema_CONFIG_VERSION, and ResetToDefault().
|
override |
Returns true when the loaded XML contains all required configuration nodes.
Definition at line 34 of file MemaAppConfiguration.cpp.
References isValid().
Referenced by isValid(), ResetToDefault(), and Mema::Mema::triggerPromptLoadConfig().
|
static |
Static variant — validates an already-parsed XmlElement without a file.
Definition at line 39 of file MemaAppConfiguration.cpp.
References CROSSPOINTGAINS, DEVCONFIG, ENABLED, getAttributeName(), getTagName(), INPUTMUTES, OUTPUTMUTES, PLUGINCONFIG, POST, PROCESSORCONFIG, and UICONFIG.
| bool Mema::MemaAppConfiguration::ResetToDefault | ( | ) |
Resets every value to factory defaults and triggers a dump.
Definition at line 106 of file MemaAppConfiguration.cpp.
References isValid().
Referenced by HandleConfigVersionConflict().