13 #include "eckit/exception/Exceptions.h"
15 using namespace eckit;
22 ReadTablesIterator::ReadTablesIterator(
TablesReader& owner,
long pos) :
34 return !(*
this == other);
106 std::lock_guard<std::mutex> lock(
m_);
109 ASSERT(idx <=
long(
tables_.size()));
111 if (idx ==
long(
tables_.size())) {
114 Offset nextPosition = (
tables_.empty() ? Offset(0) :
tables_.back()->nextPosition());
118 Offset pos =
dh_.
seek(nextPosition);
119 if (pos < nextPosition) {
124 if (!tbl)
return false;
125 tables_.emplace_back(std::move(tbl));
134 ASSERT(idx <
long(
tables_.size()));
bool operator!=(const ReadTablesIterator &other)
bool operator==(const ReadTablesIterator &other)
ReadTablesIterator & operator++()
static std::unique_ptr< Table > readTable(ThreadSharedDataHandle &dh)
Table & getTable(long idx)
std::vector< std::unique_ptr< Table > > tables_
ThreadSharedDataHandle dh_
bool ensureTable(long idx)
TablesReader(eckit::DataHandle &dh)
friend class ReadTablesIterator
std::string title() const override
eckit::Offset seek(const eckit::Offset &) override
eckit::Length estimate() override
IODA_DL void copy(const ObjectSelection &from, ObjectSelection &to, const ScaleMapping &scale_map)
Generic data copying function.