CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
appdata_xmp_path_strategy.h
Go to the documentation of this file.
1
9#pragma once
10
13#include <memory>
14#include <string>
15
17
27public:
34 explicit AppDataXmpPathStrategy(const std::string& app_data_dir);
35
36 ~AppDataXmpPathStrategy() override = default;
37
38 // Delete copy/move for simplicity
43
52 [[nodiscard]] std::string getXmpPathForImage(std::string_view source_image_path) const override;
53
63 [[nodiscard]] std::string getImagePathFromXmp(std::string_view xmp_path) const override;
64
65private:
69 const std::string m_app_data_dir;
70
74 std::unique_ptr<IXmpProvider> m_xmp_provider;
75};
76
77} // namespace CaptureMoment::Core::Serializer
Implementation of IXmpPathStrategy that stores XMP files in a centralized AppData directory.
std::string getXmpPathForImage(std::string_view source_image_path) const override
Calculates the XMP file path associated with a given source image path.
AppDataXmpPathStrategy & operator=(const AppDataXmpPathStrategy &)=delete
std::string getImagePathFromXmp(std::string_view xmp_path) const override
Calculates the source image path associated with a given XMP file path.
AppDataXmpPathStrategy(AppDataXmpPathStrategy &&)=delete
AppDataXmpPathStrategy & operator=(AppDataXmpPathStrategy &&)=delete
AppDataXmpPathStrategy(const std::string &app_data_dir)
Constructs an AppDataXmpPathStrategy.
AppDataXmpPathStrategy(const AppDataXmpPathStrategy &)=delete
Interface defining the strategy for determining XMP file paths based on image paths.
Declaration of IXmpPathStrategy interface.
Declaration of IXmpProvider interface.
CaptureMoment — footer