bool Database::GetWaysByOffset(const std::list<FileOffset>& offsets, std::vector<WayRef>& ways) const { WayDataFileRef wayDataFile=GetWayDataFile(); if (wayDataFile.Invalid()) { return false; } return wayDataFile->GetByOffset(offsets,ways); }
bool Database::GetWaysByOffset(const std::set<FileOffset>& offsets, std::unordered_map<FileOffset,WayRef>& dataMap) const { WayDataFileRef wayDataFile=GetWayDataFile(); if (wayDataFile.Invalid()) { return false; } return wayDataFile->GetByOffset(offsets,dataMap); }
bool Database::GetWayByOffset(const FileOffset& offset, WayRef& way) const { WayDataFileRef wayDataFile=GetWayDataFile(); if (wayDataFile.Invalid()) { return false; } if (wayDataFile->GetByOffset(offset,way)) { return true; } return false; }
bool Database::GetWaysByOffset(const std::set<FileOffset>& offsets, std::unordered_map<FileOffset,WayRef>& dataMap) const { WayDataFileRef wayDataFile=GetWayDataFile(); if (!wayDataFile) { return false; } StopClock time; bool result=wayDataFile->GetByOffset(offsets,dataMap); if (time.GetMilliseconds()>100) { log.Warn() << "Retrieving ways by offset took " << time.ResultString(); } return result; }
bool Database::GetWayByOffset(const FileOffset& offset, WayRef& way) const { WayDataFileRef wayDataFile=GetWayDataFile(); if (!wayDataFile) { return false; } StopClock time; bool result=wayDataFile->GetByOffset(offset,way); if (time.GetMilliseconds()>100) { log.Warn() << "Retrieving ways by offset took " << time.ResultString(); } return result; }