| 60 | } |
| 61 | |
| 62 | std::vector<int32_t> DocumentObject::getPath() const |
| 63 | { |
| 64 | if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `path` field!" }; |
| 65 | if (!doc) throw py::RuntimeError{ "doc is null!" }; |
| 66 | if (auto ret = docVisit<tomoto::DocumentHLDA>(getBoundDoc(), [](auto* doc) -> std::optional<std::vector<int32_t>> |
| 67 | { |
| 68 | return doc->path; |
| 69 | })) return *ret; |
| 70 | throw py::AttributeError{ "doc has no `path` field!" }; |
| 71 | } |
nothing calls this directly
no test coverage detected