MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ create_writer()

std::unique_ptr< TensorWriter > MayaFlux::IO::TensorFormatRegistry::create_writer ( const std::string & filepath,
std::string_view format = {} ) const
nodiscard

New writer for a destination path.

Parameters
filepathPath to write.
formatOptional format name that overrides the extension.
Returns
Writer, or nullptr when no writing format applies.

Definition at line 68 of file TensorFormat.cpp.

70{
71 const TensorFormat* chosen = format.empty() ? by_extension(filepath, true) : find(format);
72 return chosen && chosen->make_writer ? chosen->make_writer() : nullptr;
73}
const TensorFormat * find(std::string_view name) const
Format with this name, or nullptr.
const TensorFormat * by_extension(const std::string &filepath, bool need_writer) const

References by_extension(), find(), and MayaFlux::IO::TensorFormat::make_writer.

Referenced by MayaFlux::IO::IOManager::save_tensors().

Here is the call graph for this function:
Here is the caller graph for this function: