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

◆ save_composite()

MAYAFLUX_API bool MayaFlux::save_composite ( const std::shared_ptr< Kakshya::CompositeContainer > &  container,
const std::string &  suggested_name = "output.csv" 
)

Choose a CSV or TSV destination and save a CompositeContainer.

The dialog and write are synchronous. Returns false on cancellation, backend or write failure, or if Portal::System is not initialized.

Parameters
containerSource container to encode.
suggested_nameFilename pre-filled in the dialog.
Returns
True only when the complete file was written successfully.

Definition at line 418 of file Depot.cpp.

421{
422 if (!require_portal("save_composite"))
423 return false;
424
425 auto iom = get_io_manager();
426 if (!iom) {
427 MF_ERROR(Journal::Component::API, Journal::Context::Runtime,
428 "save_composite: IOManager unavailable");
429 return false;
430 }
431
432 return Portal::System::Dialog::save_file<bool>(
433 [&iom, &container](const fs::path& p) {
434 return iom->save_composite(container, p.string());
435 },
436 [](Core::SystemDialogError) { },
437 suggested_name,
438 k_composite_filters);
439}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< IO::IOManager > get_io_manager()
Retrieves the global IOManager instance for file loading and buffer management.
Definition Depot.cpp:575

References MayaFlux::Journal::API, get_io_manager(), MF_ERROR, and MayaFlux::Journal::Runtime.

+ Here is the call graph for this function: