| 574 | } |
| 575 | |
| 576 | bool 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 | |
| 593 | StringResolverPtr Element::createStringResolver(const string& geom) const |
| 594 | { |
nothing calls this directly
no test coverage detected