Files

26 lines
676 B
C++
Raw Permalink Normal View History

2025-08-18 22:39:43 +00:00
#pragma once
#include "ILog.hpp"
2026-01-23 23:00:35 +00:00
#include "IPixelariumImageView.hpp"
#include "resource.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