13#include <unordered_map>
23struct OperationDescriptor;
41 m_creators[type] = []() -> std::unique_ptr<IOperation> {
42 return std::make_unique<T>();
52 m_creators[type] = std::move(creator);
62 using OperationCreator = std::function<std::unique_ptr<IOperation>()>;
63 std::unordered_map<OperationType, OperationCreator> m_creators;
Factory Pattern - creates operations from OperationDescriptor.
void registerCreator(OperationType type, std::function< std::unique_ptr< IOperation >()> creator)
Register an operation creator for a given type using a lambda/function.
void registerOperation(OperationType type)
Register an operation creator for a given type using a template.
std::expected< std::unique_ptr< IOperation >, ErrorHandling::CoreError > create(const OperationDescriptor &descriptor) const
Create an operation instance from descriptor.
Central error handling system for CaptureMoment Core library.
CoreError
Enumeration of all error codes for CaptureMoment Core.
OperationType
Identifies the type of an image processing operation.
Manages the lifecycle of a single IWorkingImage instance.
Enumeration of image processing operation types.
A universal container for operation settings with unique identifier.