|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Singleton registry dispatching volume writes by file extension. More...
#include <VolumeWriter.hpp>
Collaboration diagram for MayaFlux::IO::VolumeWriterRegistry:Public Member Functions | |
| std::unique_ptr< VolumeWriter > | create_writer (const std::string &filepath) const |
| std::vector< std::string > | get_registered_extensions () const |
| void | register_writer (const std::vector< std::string > &extensions, const VolumeWriterFactory &factory) |
Static Public Member Functions | |
| static VolumeWriterRegistry & | instance () |
Private Attributes | |
| std::unordered_map< std::string, VolumeWriterFactory > | m_factories |
Singleton registry dispatching volume writes by file extension.
Mirrors ImageWriterRegistry. Concrete writers register themselves during subsystem init. create_writer(path) looks up the extension and returns a fresh instance, or nullptr if none is registered.
The nullptr is the whole point of the indirection: a format whose backing library is not present on a given build simply has no entry, and the caller gets a logged miss at the call site rather than a link error at startup.
Definition at line 127 of file VolumeWriter.hpp.