CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
worker_context.cpp
Go to the documentation of this file.
1
10
11#include <spdlog/spdlog.h>
12
14
16{
17 spdlog::info("WorkerContext::WorkerContext: Initializing Context...");
18
19 // 1. Create the unique instance of the Builder
20 m_builder = std::make_unique<WorkerBuilder>();
21
22 // 2. Register all available worker types in this builder
24
25 // 3. Instantiate concrete workers (Halide only for now)
26 // Note: We assume WorkerBuilder::build returns the correct concrete type.
27 // For Halide, we create the specific worker instance.
28 m_halide_worker = std::make_unique<HalideOperationWorker>();
29
30 if (!m_halide_worker) {
31 spdlog::error("WorkerContext::WorkerContext: Failed to build Halide Worker.");
32 }
33
34 spdlog::debug("WorkerContext::WorkerContext: Context initialized with Builder and Workers.");
35 spdlog::debug("WorkerContext::WorkerContext: Builder and Workers are ready for use.");
36
37 // Note: The actual execution with operations is done by the caller (StateImageManager)
38 // passing the context and data to the worker.
39
40 spdlog::info("WorkerContext::WorkerContext: Initialization complete.");
41}
42
43} // namespace CaptureMoment::Core::Workers
static void registerAll(WorkerBuilder &builder)
Register all available workers.
Container for worker infrastructure (Builder and Workers).
Central registry for all processing workers.
CaptureMoment — footer