CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
app_config.h
Go to the documentation of this file.
1
14#pragma once
15
17#include "Halide.h"
18
19namespace CaptureMoment::Core {
20
21namespace Config {
22
46class AppConfig {
47public:
56 static AppConfig& instance();
57
69
79 [[nodiscard]] Common::MemoryType getProcessingBackend() const noexcept;
80
95 static void setHalideTarget(const Halide::Target& target);
96
107 [[nodiscard]] static const Halide::Target& getHalideTarget();
108
109 // ============================================================
110 // Testing Utilities
111 // ============================================================
112#ifdef ENABLE_TESTS // Defined via CMake when BUILD_TESTS is ON
122 void reset();
123#endif
124
125private:
129 AppConfig() = default;
130
134 AppConfig(const AppConfig&) = delete;
135
139 AppConfig& operator=(const AppConfig&) = delete;
140
150
159 static Halide::Target s_halide_target;
160};
161
162} // namespace Config
163
164} // namespace CaptureMoment::Core
Singleton class for managing application-wide configuration settings.
Definition app_config.h:46
static void setHalideTarget(const Halide::Target &target)
Sets the configured Halide Target object.
Common::MemoryType getProcessingBackend() const noexcept
Gets the configured processing backend.
static AppConfig & instance()
Gets the singleton instance of AppConfig.
void setProcessingBackend(Common::MemoryType backend)
Sets the processing backend (CPU or GPU) for image operations.
static const Halide::Target & getHalideTarget()
Gets the configured Halide Target object.
Enum representing the memory type where image data is stored (CPU or GPU).
MemoryType
Enum representing the memory type where image data is stored.
Definition memory_type.h:24
@ CPU_RAM
Data is stored in main CPU RAM.
Manages the lifecycle of a single IWorkingImage instance.
CaptureMoment — footer