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

Method OSMElementCacheReader

generator/intermediate_data.cpp:348–360  ·  view source on GitHub ↗

OSMElementCacheReader ---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

346
347// OSMElementCacheReader ---------------------------------------------------------------------------
348OSMElementCacheReader::OSMElementCacheReader(IntermediateDataObjectsCache::AllocatedObjects & allocatedObjects,
349 string const & name, bool preload)
350 : m_fileReader(name)
351 , m_offsetsReader(allocatedObjects.GetOrCreateIndexReader(name + OFFSET_EXT))
352 , m_name(name)
353 , m_preload(preload)
354{
355 if (!m_preload)
356 return;
357 size_t sz = m_fileReader.Size();
358 m_data.resize(sz);
359 m_fileReader.Read(0, m_data.data(), sz);
360}
361
362// OSMElementCacheWriter ---------------------------------------------------------------------------
363OSMElementCacheWriter::OSMElementCacheWriter(string const & name)

Callers

nothing calls this directly

Calls 4

SizeMethod · 0.45
resizeMethod · 0.45
ReadMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected