DATRW++ library: seismic data I/O with multiple formats

◆ read() [15/15]

void datrw::binary::ibinstream::read ( Tiseries v)

Definition at line 253 of file ibinstream.cc.

References DATRW_assert, Mis, Mswap, read(), and datrw::util::swap().

254  {
255  int first, last;
256  this->read(first);
257  this->read(last);
258  v=Tiseries(first,last);
259  DATRW_assert(Mis.read(reinterpret_cast<char *>(v.pointer()),
260  v.size()*sizeof(Tiseries::Tvalue)),
261  "ERROR (ibinstream::read): reading integer series");
262  if (Mswap)
263  {
264  aff::Iterator<Tiseries> I(v);
265  while (I.valid())
266  {
267  *I=::datrw::util::swap(*I);
268  ++I;
269  }
270  }
271  } // void ibinstream::read(Tiseries& v)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
std::istream & Mis
Definition: ibinstream.h:80
T swap(const T &value)
How to swap any generic type.
Definition: bytesex.h:118
int Tvalue
Definition: pdasread.h:75
aff::Series< int > Tiseries
Definition: types.h:47
Here is the call graph for this function: