MCPcopy Create free account
hub / github.com/bab2min/tomotopy / docVisit

Function docVisit

src/python/handler/utils.h:271–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269 typename Fn
270>
271auto docVisit(tomoto::DocumentBase* doc, Fn&& visitor) -> decltype(visitor(static_cast<DocTy<tomoto::TermWeight::one>*>(doc)))
272{
273 if (auto* d = dynamic_cast<DocTy<tomoto::TermWeight::one>*>(doc))
274 {
275 return visitor(d);
276 }
277
278 if (auto* d = dynamic_cast<DocTy<tomoto::TermWeight::idf>*>(doc))
279 {
280 return visitor(d);
281 }
282
283 if (auto* d = dynamic_cast<DocTy<tomoto::TermWeight::pmi>*>(doc))
284 {
285 return visitor(d);
286 }
287 return {};
288}
289
290template<
291 template<tomoto::TermWeight tw> class DocTy,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected