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

Method validate

source/MaterialXCore/Element.cpp:576–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576bool Element::validate(string* message) const
577{
578 bool res = true;
579 validateRequire(isValidName(getName()), res, message, "Invalid element name");
580 if (hasInheritString())
581 {
582 bool validInherit = getInheritsFrom() && getInheritsFrom()->getCategory() == getCategory();
583 validateRequire(validInherit, res, message, "Invalid element inheritance");
584 }
585 for (auto child : getChildren())
586 {
587 res = child->validate(message) && res;
588 }
589 validateRequire(!hasInheritanceCycle(), res, message, "Cycle in element inheritance chain");
590 return res;
591}
592
593StringResolverPtr Element::createStringResolver(const string& geom) const
594{

Callers

nothing calls this directly

Calls 15

isValidNameFunction · 0.85
hasInheritStringFunction · 0.85
getInheritsFromFunction · 0.85
hasTypeFunction · 0.85
hasInterfaceNameFunction · 0.85
getDocumentFunction · 0.85
hasUnitFunction · 0.85
getUnitFunction · 0.85
getCategoryMethod · 0.80
getActiveValueElementMethod · 0.80
getUnitDefsMethod · 0.80
hasValueStringFunction · 0.70

Tested by

no test coverage detected