| 66 | } |
| 67 | |
| 68 | void E57Reader::initializeBuffers() |
| 69 | { |
| 70 | m_doubleBuffers.clear(); |
| 71 | m_destBuffers.clear(); |
| 72 | m_e57PointPrototype.reset(new StructureNode(m_scan->getPointPrototype())); |
| 73 | |
| 74 | // Initialize for supported dimensions. |
| 75 | auto supportedFields = e57plugin::supportedE57Types(); |
| 76 | for (auto& dimension : supportedFields) |
| 77 | { |
| 78 | if (m_e57PointPrototype->isDefined(dimension)) |
| 79 | { |
| 80 | m_doubleBuffers[dimension] = |
| 81 | std::vector<double>(m_defaultChunkSize, 0); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // Initialize for extra dimensions. |
| 86 | for (auto i = m_extraDims->begin(); i != m_extraDims->end(); ++i) |
| 87 | { |
| 88 | if (m_e57PointPrototype->isDefined(i->m_name)) |
| 89 | { |
| 90 | m_doubleBuffers[i->m_name] = |
| 91 | std::vector<double>(m_defaultChunkSize, 0); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // Link to destination buffers. |
| 96 | for (auto& keyValue : m_doubleBuffers) |
| 97 | { |
| 98 | m_destBuffers.emplace_back( |
| 99 | *m_imf, keyValue.first, keyValue.second.data(), m_defaultChunkSize, |
| 100 | true, |
| 101 | (m_e57PointPrototype->get(keyValue.first).type() == |
| 102 | e57::E57_SCALED_INTEGER)); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | void E57Reader::addDimensions(PointLayoutPtr layout) |
| 107 | { |
nothing calls this directly
no test coverage detected