| 344 | |
| 345 | |
| 346 | point_count_t PgReader::read(PointViewPtr view, point_count_t count) |
| 347 | { |
| 348 | if (eof()) |
| 349 | return 0; |
| 350 | |
| 351 | log()->get(LogLevel::Debug) << "readBufferImpl called with " |
| 352 | "PointView filled to " << view->size() << " points" << |
| 353 | std::endl; |
| 354 | |
| 355 | point_count_t totalNumRead = 0; |
| 356 | while (totalNumRead < count) |
| 357 | { |
| 358 | if (m_patch.remaining == 0) |
| 359 | if (!NextBuffer()) |
| 360 | return totalNumRead; |
| 361 | PointId bufBegin = view->size(); |
| 362 | point_count_t numRead = readPgPatch(view, count - totalNumRead); |
| 363 | PointId bufEnd = bufBegin + numRead; |
| 364 | totalNumRead += numRead; |
| 365 | } |
| 366 | return totalNumRead; |
| 367 | } |
| 368 | |
| 369 | bool PgReader::processOne(PointRef& point) |
| 370 | { |