MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / write

Method write

src/OpenColorIO/transforms/GroupTransform.cpp:114–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void GroupTransformImpl::write(const ConstConfigRcPtr & config,
115 const char * formatName,
116 std::ostream & os) const
117{
118 FileFormat* fmt = FormatRegistry::GetInstance().getFileFormatByName(formatName);
119
120 if (!fmt)
121 {
122 std::ostringstream err;
123 err << "The format named '" << formatName;
124 err << "' could not be found. ";
125 throw Exception(err.str().c_str());
126 }
127
128 try
129 {
130 fmt->write(config, config->getCurrentContext(), *this, formatName, os);
131 }
132 catch (std::exception & e)
133 {
134 std::ostringstream err;
135 err << "Error writing format '" << formatName << "': ";
136 err << e.what();
137 throw Exception(err.str().c_str());
138 }
139}
140
141int GroupTransform::GetNumWriteFormats() noexcept
142{

Callers

nothing calls this directly

Calls 2

getFileFormatByNameMethod · 0.80
getCurrentContextMethod · 0.45

Tested by

no test coverage detected