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

◆ open_composite_writer()

std::shared_ptr< CompositeWriter > MayaFlux::IO::IOManager::open_composite_writer ( const std::string &  filepath,
const Kakshya::CompositeLayout &  layout 
)

Open a Composite writer selected by the output file format.

CSV and TSV currently use DelimitedTextWriter. The caller owns the returned writer and must call write_rows() and close(). IOManager does not retain it or enqueue its writes.

Parameters
filepathDestination path with a supported extension.
layoutField layout for every slice written to the file.
Returns
Open writer, or nullptr if the format or layout is unsupported or the file could not be opened.

Definition at line 839 of file IOManager.cpp.

842{
843 auto writer = std::make_shared<DelimitedTextWriter>();
844 if (!writer->can_write(filepath)) {
846 "IOManager::open_composite_writer: unsupported format '{}'", filepath);
847 return nullptr;
848 }
849
850 if (!writer->open(filepath, layout)) {
852 "IOManager::open_composite_writer: failed to open '{}' because {}",
853 filepath, writer->get_last_error());
854 return nullptr;
855 }
856
857 return writer;
858}
#define MF_ERROR(comp, ctx,...)
@ FileIO
Filesystem I/O operations.
@ API
MayaFlux/API Wrapper and convenience functions.

References MayaFlux::Journal::API, MayaFlux::Journal::FileIO, and MF_ERROR.

Referenced by save_composite().

+ Here is the caller graph for this function: