| 1450 | // ============================================================================ |
| 1451 | |
| 1452 | std::string Resource::toString() const { |
| 1453 | if (!_object) return ""; |
| 1454 | // Mirror Python __str__() (Resource.py:1230): "<hash/link_id>". |
| 1455 | std::string s = "<"; |
| 1456 | s += _object->_hash.toHex(); |
| 1457 | s += "/"; |
| 1458 | if (_object->_link) s += _object->_link.link_id().toHex(); |
| 1459 | s += ">"; |
| 1460 | return s; |
| 1461 | } |
| 1462 | |
| 1463 | |
| 1464 | // ============================================================================ |