| 30 | } |
| 31 | |
| 32 | std::string ContextBase::getIdAndPathString() const { |
| 33 | if (_path.isEmpty()) { |
| 34 | if (!_scopeName.isEmpty()) { |
| 35 | return fmt::format("id {} in scope '{}'", _contextId, _scopeName.slowToString()); |
| 36 | } |
| 37 | return fmt::format("id {}", _contextId); |
| 38 | } else { |
| 39 | return fmt::format("id {} with component path {}", _contextId, _path.toString()); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | void ContextBase::withAttribution(const AttributionFunctionCallback& handler) const { |
| 44 | _attribution.fn(handler); |
no test coverage detected