Porytiles
Loading...
Searching...
No Matches
jasc_palette_loader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <filesystem>
4#include <memory>
5
6#include "gsl/pointers"
7
12
13namespace porytiles {
14
17 public:
18 explicit JascPaletteLoader(gsl::not_null<const TextFormatter *> format)
19 : format_{format}, file_printer_{std::make_unique<FileHighlightPrinter>(format)}
20 {
21 }
22
24 load(const std::filesystem::path &path) const override;
25
27 load_with_wildcards(const std::filesystem::path &path) const override;
28
29 private:
30 const TextFormatter *format_;
31 const std::unique_ptr<FileHighlightPrinter> file_printer_;
32};
33
34} // namespace porytiles
A result type that maintains a chainable sequence of errors for debugging and error reporting.
A service for printing file lines with highlighted lines and line numbers.
A service interface that loads a fixed-length Palette from a given file.
An implementation of FilePaletteLoader that loads palettes from JASC-PAL (Paintshop Pro) palette file...
ChainableResult< Palette< Rgba32, palette::max_size > > load_with_wildcards(const std::filesystem::path &path) const override
JascPaletteLoader(gsl::not_null< const TextFormatter * > format)
ChainableResult< Palette< Rgba32, palette::max_size > > load(const std::filesystem::path &path) const override
Abstract base class for applying text styling with context-aware formatting.