2025-08-18 22:39:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
2026-01-23 23:00:35 +00:00
|
|
|
#include "IPixelariumImageView.hpp"
|
2025-08-18 22:39:43 +00:00
|
|
|
#include "resources/resource.hpp"
|
2025-09-23 21:57:08 +02:00
|
|
|
#include "utilities/ILog.hpp"
|
2026-01-23 23:00:35 +00:00
|
|
|
|
|
|
|
|
namespace pixelarium::application
|
2025-08-18 22:39:43 +00:00
|
|
|
{
|
2025-09-26 21:09:51 +02:00
|
|
|
/// @brief Factory for instantiating matching views to different implementations of IPixelariumImage.
|
2025-08-18 22:39:43 +00:00
|
|
|
class ImageViewFactory
|
|
|
|
|
{
|
2026-01-23 23:00:35 +00:00
|
|
|
using Image = imaging::IPixelariumImageCvMat;
|
2025-08-18 22:39:43 +00:00
|
|
|
using Pool = resources::ImageResourcePool;
|
2025-09-23 21:57:08 +02:00
|
|
|
using Log = utils::log::ILog;
|
2025-08-18 22:39:43 +00:00
|
|
|
|
|
|
|
|
public:
|
2025-09-23 21:57:08 +02:00
|
|
|
explicit ImageViewFactory(Pool& pool, const Log& log) : image_pool_(pool), log_(log) {}
|
2025-08-18 22:39:43 +00:00
|
|
|
|
2025-09-26 21:09:51 +02:00
|
|
|
std::unique_ptr<IPixelariumImageView> RenderImage(resources::ResourceKey id);
|
2025-08-18 22:39:43 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Pool& image_pool_;
|
2025-09-23 21:57:08 +02:00
|
|
|
const Log& log_;
|
2025-08-18 22:39:43 +00:00
|
|
|
};
|
2026-01-23 23:00:35 +00:00
|
|
|
} // namespace pixelarium::application
|