17#include <spdlog/spdlog.h>
22class ImageControllerBase;
36class OperationStateManager {
45 std::shared_ptr<Core::Engine::PhotoEngine> engine
88 [[nodiscard]] std::vector<Core::Operations::OperationDescriptor>
getActiveOperations()
const;
91 mutable std::mutex m_mutex;
92 std::vector<Core::Operations::OperationDescriptor> m_active_operations;
95 std::shared_ptr<Core::Engine::PhotoEngine> m_engine;
101 void applyCurrentOperationsToEngine();
Manages the state of active image operations.
void clearAllOperations()
Clears all active operations, resetting the state to the original image.
void addOrUpdateOperation(const Core::Operations::OperationDescriptor &descriptor)
Adds or updates an operation in the active state.
~OperationStateManager()=default
OperationStateManager(const OperationStateManager &)=delete
OperationStateManager(Controller::ImageControllerBase *controller, std::shared_ptr< Core::Engine::PhotoEngine > engine)
Constructs an OperationStateManager.
std::vector< Core::Operations::OperationDescriptor > getActiveOperations() const
Gets the current list of active operation descriptors.
void removeOperation(Core::Operations::OperationType type)
Removes an operation of a specific type from the active state.
OperationStateManager & operator=(const OperationStateManager &)=delete
OperationType
Identifies the type of an image processing operation.
Descriptor of an operation with its parameters and unique identifier.
Declaration of PhotoEngine class.
A universal container for operation settings with unique identifier.