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

◆ execute_volume_write()

bool MayaFlux::IO::Detail::execute_volume_write ( const std::string &  filepath,
const Kakshya::VolumeData &  data,
const VolumeWriteOptions &  options 
)

Definition at line 205 of file IOTransitions.cpp.

209{
210 auto writer = VolumeWriterRegistry::instance().create_writer(filepath);
211 if (!writer) {
212 MF_ERROR(Journal::Component::IO, Journal::Context::FileIO,
213 "save_volume task: no writer registered for '{}'", filepath);
214 return false;
215 }
216 const bool ok = writer->write(filepath, data, options);
217 if (!ok) {
218 MF_ERROR(Journal::Component::IO, Journal::Context::FileIO,
219 "save_volume task: writer failed for '{}': {}",
220 filepath, writer->get_last_error());
221 } else {
222 MF_INFO(Journal::Component::IO, Journal::Context::FileIO,
223 "save_volume task: wrote '{}'", filepath);
224 }
225 return ok;
226}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)

References MayaFlux::IO::WriterRegistry< Writer >::create_writer(), MayaFlux::Journal::FileIO, MayaFlux::IO::WriterRegistry< Writer >::instance(), MayaFlux::Journal::IO, MF_ERROR, and MF_INFO.

Referenced by MayaFlux::IO::IOManager::save_volume(), and MayaFlux::IO::IOManager::save_volume().

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