MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::IO::ImageWriterRegistry Class Reference

Singleton registry dispatching image writes by file extension. More...

#include <ImageWriter.hpp>

+ Collaboration diagram for MayaFlux::IO::ImageWriterRegistry:

Public Member Functions

std::unique_ptr< ImageWritercreate_writer (const std::string &filepath) const
 
std::vector< std::string > get_registered_extensions () const
 
void register_writer (const std::vector< std::string > &extensions, const ImageWriterFactory &factory)
 

Static Public Member Functions

static ImageWriterRegistryinstance ()
 

Private Attributes

std::unordered_map< std::string, ImageWriterFactorym_factories
 

Detailed Description

Singleton registry dispatching image writes by file extension.

Mirrors FileReaderRegistry. Concrete writers register themselves on static initialization. create_writer(path) looks up the extension and returns a fresh instance of the appropriate writer, or nullptr if none is registered.

Definition at line 80 of file ImageWriter.hpp.


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