Porytiles
Loading...
Searching...
No Matches
porytiles::PngImporter Class Referenceabstract

Imports a Png from the filesystem. More...

#include <png_importer.hpp>

Inheritance diagram for porytiles::PngImporter:
[legend]

Public Member Functions

virtual ~PngImporter ()=default
 
virtual std::expected< std::unique_ptr< Png >, std::string > Read (const std::filesystem::path &path) const =0
 Imports a Png at a given path from the filesystem.
 

Detailed Description

Imports a Png from the filesystem.

Definition at line 15 of file png_importer.hpp.

Constructor & Destructor Documentation

◆ ~PngImporter()

virtual porytiles::PngImporter::~PngImporter ( )
virtualdefault

Member Function Documentation

◆ Read()

virtual std::expected< std::unique_ptr< Png >, std::string > porytiles::PngImporter::Read ( const std::filesystem::path &  path) const
pure virtual

Imports a Png at a given path from the filesystem.

If the given path does not exist or does not describe a file in valid PNG format, it returns an error message. Otherwise, the initialized Png is returned.

Parameters
pathThe path of the Png to import.
Returns
A std::unique_ptr to the imported Png, otherwise a std::string describing the error.

Implemented in porytiles::PngImporterImpl.


The documentation for this class was generated from the following file: