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

◆ read() [13/15]

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

Definition at line 209 of file ibinstream.cc.

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

210  {
211  int first, last;
212  this->read(first);
213  this->read(last);
214  v=Tdseries(first,last);
215  DATRW_assert(Mis.read(reinterpret_cast<char *>(v.pointer()),
216  v.size()*sizeof(Tdseries::Tvalue)),
217  "ERROR (ibinstream::read): reading double series");
218  if (Mswap)
219  {
220  aff::Iterator<Tdseries> I(v);
221  while (I.valid())
222  {
223  *I=::datrw::util::swap(*I);
224  ++I;
225  }
226  }
227  } // void ibinstream::read(Tdseries& v)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
aff::Series< double > Tdseries
Definition: types.h:45
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
Here is the call graph for this function: