| 402 | } |
| 403 | |
| 404 | std::string EntityClass::getAttributeDescription(const std::string& name) |
| 405 | { |
| 406 | ensureParsed(); |
| 407 | |
| 408 | // Check the attributes on this class first |
| 409 | const auto& attribute = _attributes.find(name); |
| 410 | |
| 411 | if (attribute != _attributes.end()) |
| 412 | { |
| 413 | const auto& description = attribute->second.getDescription(); |
| 414 | |
| 415 | if (!description.empty()) |
| 416 | { |
| 417 | return description; |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | // Walk up the inheritance tree until we spot a non-empty description |
| 422 | return _parent ? _parent->getAttributeDescription(name) : ""; |
| 423 | } |
| 424 | |
| 425 | void EntityClass::clear() |
| 426 | { |