2025-08-18 22:39:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-09-23 21:57:08 +02:00
|
|
|
#include "PixelariumImageViewDefault.hpp"
|
|
|
|
|
#include "rendering/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"
|
2025-09-13 14:49:59 +02:00
|
|
|
namespace pixelarium::render
|
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
|
|
|
|
|
{
|
2025-09-22 23:13:28 +02:00
|
|
|
using Image = imaging::IPixelariumImage;
|
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
|
|
|
};
|
2025-09-13 14:49:59 +02:00
|
|
|
} // namespace pixelarium::render
|