CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
pipeline_builder.h
Go to the documentation of this file.
1
22#pragma once
23
24#include "pipeline_type.h"
26
27#include <memory>
28#include <unordered_map>
29#include <functional>
30
31namespace CaptureMoment::Core {
32
33namespace Pipeline {
34
44public:
52 using CreatorFunc = std::function<std::unique_ptr<IPipelineExecutor>()>;
53
54 // ============================================================
55 // Deleted constructors and assignment operators (static-only class)
56 // ============================================================
57
62 PipelineBuilder() = delete;
63
68 ~PipelineBuilder() = delete;
69
75
81
87
93
94 // ============================================================
95 // Static Methods
96 // ============================================================
97
110 [[nodiscard]] static std::unique_ptr<IPipelineExecutor> build(PipelineType type);
111
122 static void registerCreator(PipelineType type, CreatorFunc creator);
123
124private:
129 static std::unordered_map<PipelineType, CreatorFunc>& getRegistry();
130};
131
132} // namespace Pipeline
133
134} // namespace CaptureMoment::Core
Static registry for creating IPipelineExecutor instances based on type.
PipelineBuilder(const PipelineBuilder &)=delete
Deleted copy constructor.
PipelineBuilder(PipelineBuilder &&)=delete
Deleted move constructor.
std::function< std::unique_ptr< IPipelineExecutor >()> CreatorFunc
Definition of the creator function signature.
static void registerCreator(PipelineType type, CreatorFunc creator)
Registers a creator function for a specific pipeline type.
~PipelineBuilder()=delete
Deleted destructor.
PipelineBuilder & operator=(PipelineBuilder &&)=delete
Deleted move assignment operator.
PipelineBuilder()=delete
Deleted default constructor.
PipelineBuilder & operator=(const PipelineBuilder &)=delete
Deleted copy assignment operator.
static std::unique_ptr< IPipelineExecutor > build(PipelineType type)
Retrieves an instance of the executor for the specified type.
Abstract interface for executing a compiled image processing pipeline.
PipelineType
Identifies the specific technology or strategy used for image processing.
Manages the lifecycle of a single IWorkingImage instance.
Enumeration defining supported pipeline types.
CaptureMoment — footer