MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / getUnitConverter

Method getUnitConverter

source/MaterialXCore/Unit.cpp:205–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205UnitConverterPtr UnitConverterRegistry::getUnitConverter(UnitTypeDefPtr def)
206{
207 if (def)
208 {
209 auto it = _unitConverters.find(def->getName());
210 if (it != _unitConverters.end())
211 {
212 return it->second;
213 }
214 }
215
216 return nullptr;
217}
218
219void UnitConverterRegistry::clearUnitConverters()
220{

Callers 3

Unit.cppFile · 0.80
createNodeMethod · 0.80

Calls 3

findMethod · 0.45
getNameMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected