![]() |
Mema
Memory Matrix — multi-channel audio matrix monitor and router
|
XML-backed configuration manager for the Mema.Re remote-control application. More...
#include <MemaReAppConfiguration.h>
Inheritance diagram for MemaReAppConfiguration:
Collaboration diagram for MemaReAppConfiguration:Public Types | |
| enum | TagID { CONNECTIONCONFIG , SERVICEDESCRIPTION , VISUCONFIG , CONTROLFORMAT , CONTROLCOLOUR , LOOKANDFEEL , CONTROLSSIZE , EXTCTRLCONFIG , ADMOSCHOST , ADMOSCCLIENT } |
| XML element tag identifiers used when serialising/deserialising the configuration. More... | |
| enum | AttributeID { ENABLED , IP , PORT } |
| XML attribute identifiers used alongside TagID elements. More... | |
Public Member Functions | |
| MemaReAppConfiguration (const File &file) | |
| Constructs the configuration, loading from or creating the given XML file. | |
| ~MemaReAppConfiguration () override | |
| bool | isValid () override |
| Returns true when the loaded XML contains all required Mema.Re 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.Re remote-control application.
Persists the user's chosen Mema service, active control format, accent colour, look-and-feel, control element size, and ADM-OSC external-control settings across application launches.
ControlParametersMessage updates back to Mema over the same TCP connection and can also receive ADM-OSC UDP packets from an external spatial-audio controller (e.g. Grapes). Definition at line 42 of file MemaReAppConfiguration.h.
XML attribute identifiers used alongside TagID elements.
| Enumerator | |
|---|---|
| ENABLED | Boolean flag indicating whether a feature or connection is active. |
| IP | IP address string (used for ADM-OSC remote client address). |
| PORT | UDP/TCP port number. |
Definition at line 90 of file MemaReAppConfiguration.h.
XML element tag identifiers used when serialising/deserialising the configuration.
| Enumerator | |
|---|---|
| CONNECTIONCONFIG | Root element for TCP connection settings. |
| SERVICEDESCRIPTION | Stored multicast service descriptor of the last connected Mema instance. |
| VISUCONFIG | Root element for visualisation/control settings. |
| CONTROLFORMAT | Active control mode (faderbank, 2-D panning layout, plugin parameters). |
| CONTROLCOLOUR | User-selected accent colour for control elements. |
| LOOKANDFEEL | Active look-and-feel (follow host / dark / light). |
| CONTROLSSIZE | Size category for control widgets (S / M / L). |
| EXTCTRLCONFIG | Root element for external ADM-OSC controller settings. |
| ADMOSCHOST | ADM-OSC host (local UDP listen port). |
| ADMOSCCLIENT | ADM-OSC client (remote IP and port for outgoing messages). |
Definition at line 47 of file MemaReAppConfiguration.h.
|
explicit |
Constructs the configuration, loading from or creating the given XML file.
Definition at line 22 of file MemaReAppConfiguration.cpp.
References Mema_CONFIG_VERSION.
|
override |
Definition at line 28 of file MemaReAppConfiguration.cpp.
|
inlinestatic |
Definition at line 96 of file MemaReAppConfiguration.h.
|
inlinestatic |
Definition at line 60 of file MemaReAppConfiguration.h.
References ADMOSCCLIENT, ADMOSCHOST, CONNECTIONCONFIG, CONTROLCOLOUR, CONTROLFORMAT, CONTROLSSIZE, EXTCTRLCONFIG, LOOKANDFEEL, SERVICEDESCRIPTION, and VISUCONFIG.
Referenced by isValid().
|
overrideprotected |
Called when the persisted config version differs from the current app version.
Definition at line 132 of file MemaReAppConfiguration.cpp.
References Mema_CONFIG_VERSION, and ResetToDefault().
|
override |
Returns true when the loaded XML contains all required Mema.Re configuration nodes.
Definition at line 32 of file MemaReAppConfiguration.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 MemaReAppConfiguration.cpp.
References CONNECTIONCONFIG, CONTROLCOLOUR, CONTROLFORMAT, getTagName(), LOOKANDFEEL, SERVICEDESCRIPTION, and VISUCONFIG.
| bool MemaReAppConfiguration::ResetToDefault | ( | ) |
Resets every configuration value to its factory default and triggers a dump.
Definition at line 89 of file MemaReAppConfiguration.cpp.
References isValid().
Referenced by HandleConfigVersionConflict().