MCPcopy Create free account
hub / github.com/comaps/comaps / GetTypeByPathImpl

Method GetTypeByPathImpl

libs/indexer/classificator.cpp:357–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356template <typename Iter>
357uint32_t Classificator::GetTypeByPathImpl(Iter beg, Iter end) const
358{
359 ClassifObject const * p = GetRoot();
360
361 uint32_t type = ftype::GetEmptyValue();
362
363 while (beg != end)
364 {
365 ClassifObjectPtr ptr = p->BinaryFind(*beg++);
366 if (!ptr)
367 return INVALID_TYPE;
368
369 ftype::PushValue(type, ptr.GetIndex());
370 p = ptr.get();
371 }
372
373 return type;
374}
375
376uint32_t Classificator::GetTypeByPathSafe(std::vector<std::string_view> const & path) const
377{

Callers

nothing calls this directly

Calls 6

GetRootFunction · 0.85
GetEmptyValueFunction · 0.85
PushValueFunction · 0.85
BinaryFindMethod · 0.80
getMethod · 0.65
GetIndexMethod · 0.45

Tested by

no test coverage detected