Porytiles
Loading...
Searching...
No Matches
jasc_pal_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
18class JascPalLoader final : public FilePalLoader {
19 public:
20 explicit JascPalLoader(gsl::not_null<const TextFormatter *> format)
21 : format_{format}, file_printer_{std::make_unique<FileHighlightPrinter>(format)}
22 {
23 }
24
26 load(const std::filesystem::path &path) const override;
27
29 load_with_wildcards(const std::filesystem::path &path) const override;
30
31 private:
32 const TextFormatter *format_;
33 const std::unique_ptr<FileHighlightPrinter> file_printer_;
34};
35
36} // 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 FilePalLoader that loads palettes from JASC-PAL (Paintshop Pro) pal files.
ChainableResult< Palette< Rgba32, pal::max_size > > load_with_wildcards(const std::filesystem::path &path) const override
ChainableResult< Palette< Rgba32, pal::max_size > > load(const std::filesystem::path &path) const override
JascPalLoader(gsl::not_null< const TextFormatter * > format)
Abstract base class for applying text styling with context-aware formatting.