| 167 | } |
| 168 | |
| 169 | size_t DocumentObject::getTimepoint() const |
| 170 | { |
| 171 | if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `timepoint` field!" }; |
| 172 | if (!doc) throw py::RuntimeError{ "doc is null!" }; |
| 173 | if (auto ret = docVisit<tomoto::DocumentDTM>(getBoundDoc(), [](auto* doc) -> std::optional<size_t> |
| 174 | { |
| 175 | return doc->timepoint; |
| 176 | })) return *ret; |
| 177 | throw py::AttributeError{ "doc has no `timepoint` field!" }; |
| 178 | } |
nothing calls this directly
no test coverage detected