CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
operation_state_manager.h
Go to the documentation of this file.
1
8#pragma once
9
11#include <vector>
12#include <mutex>
13
14#include <spdlog/spdlog.h>
15
16namespace CaptureMoment::UI {
17
18namespace Managers {
19
30public:
34 explicit OperationStateManager();
35
37
38 // Disable copy and assignment
41
51
60
65
72 [[nodiscard]] std::vector<Core::Operations::OperationDescriptor> getActiveOperations() const;
73
74private:
75 mutable std::mutex m_mutex;
76 std::vector<Core::Operations::OperationDescriptor> m_active_operations;
77};
78
79} // namespace Managers
80
81} // namespace CaptureMoment::UI
Manages the state of active image operations.
void clearAllOperations()
Clears all active operations, resetting the state to empty (original image with no ops).
void addOrUpdateOperation(const Core::Operations::OperationDescriptor &descriptor)
Adds or updates an operation in the active state.
OperationStateManager(const OperationStateManager &)=delete
OperationStateManager()
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.
A universal container for operation settings with unique identifier.
CaptureMoment — footer