107 void addHook(std::unique_ptr<PresetEventHook> hook);
131 std::vector<std::unique_ptr<PresetEventHook>>
m_hooks;
Middleware class for managing preset events and hooks.
Definition PresetEventMiddleware.h:101
bool removeHook(PresetEventHook *hook)
Removes a hook from the middleware.
Definition PresetEventMiddleware.cpp:5
void addHook(std::unique_ptr< PresetEventHook > hook)
Adds a new hook to the middleware.
Definition PresetEventMiddleware.cpp:3
KwidgetLoadResponse processKwidgetLoad(KwidgetLoadRequest &request)
Processes a Kwidget load request through all registered hooks.
Definition PresetEventMiddleware.cpp:33
PresetLoadResponse processPresetLoad(PresetLoadRequest &request)
Processes a preset load request through all registered hooks.
Definition PresetEventMiddleware.cpp:18
std::vector< std::unique_ptr< PresetEventHook > > m_hooks
Definition PresetEventMiddleware.h:131
Definition AirAbsorptionFilter.cpp:2
An abstract base class for preset event hooks. These can be used to intercept and modify preset and K...
Definition PresetEventMiddleware.h:65
virtual void onKwidgetLoad(KwidgetLoadRequest &request, KwidgetLoadResponse &response)=0
Called when a Kwidget is being loaded.
virtual ~PresetEventHook()=default
Virtual destructor for proper cleanup of derived classes.
virtual void onPresetLoad(PresetLoadRequest &request, PresetLoadResponse &response)=0
Called when a preset is being loaded.
A middleware request object for a preset load event.
Definition PresetEventMiddleware.h:7
File presetFile
Definition PresetEventMiddleware.h:12
ValueTree newState
The new preset state value tree.
Definition PresetEventMiddleware.h:11
A simple middleware response object containing the success status and a message.
Definition PresetEventMiddleware.h:19
String message
A message describing the result of the middleware operation.
Definition PresetEventMiddleware.h:29
bool success
Indicates whether the middleware was successful in processing the preset load request,...
Definition PresetEventMiddleware.h:24