Porytiles
Loading...
Searching...
No Matches
porytiles::PngImporterImpl Class Referencefinal

#include <png_importer_impl.hpp>

Inheritance diagram for porytiles::PngImporterImpl:
[legend]
Collaboration diagram for porytiles::PngImporterImpl:
[legend]

Public Member Functions

 PngImporterImpl ()=default
 
std::expected< std::unique_ptr< Png >, std::string > Read (const std::filesystem::path &path) const override
 Imports a Png at a given path from the filesystem.
 
- Public Member Functions inherited from porytiles::PngImporter
virtual ~PngImporter ()=default
 

Detailed Description

Definition at line 13 of file png_importer_impl.hpp.

Constructor & Destructor Documentation

◆ PngImporterImpl()

porytiles::PngImporterImpl::PngImporterImpl ( )
default

Member Function Documentation

◆ Read()

std::expected< std::unique_ptr< Png >, std::string > porytiles::PngImporterImpl::Read ( const std::filesystem::path &  path) const
overridevirtual

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.

Implements porytiles::PngImporter.

Definition at line 18 of file png_importer_impl.cpp.


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